summaryrefslogtreecommitdiff
path: root/sec
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2025-06-26 13:58:50 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2025-06-26 13:58:50 +0100
commit71e72351e17ce41ae56b69c095858e395e5ef917 (patch)
tree9307cfb9d1b44d397da7647fcbe7944b6a012af5 /sec
parenta5178bb076a21b9ffbf4236683d89c8a6cd2258c (diff)
Fix 635--650.
Diffstat (limited to 'sec')
-rw-r--r--sec/encoding.ltx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sec/encoding.ltx b/sec/encoding.ltx
index 1078597..079027a 100644
--- a/sec/encoding.ltx
+++ b/sec/encoding.ltx
@@ -367,19 +367,22 @@ let balanced n f = primrec n with
\vspace{-\baselineskip}
\end{listing}
-And \systemtinline{compose'} reduces to:
+And \systemtinline{compose} reduces to the following. Most of the
+changes happened to the \systemtinline{update} function as it computes
+the \(\mathsf{snoc}\) on a given index.
\begin{listing}[H]
\begin{systemt}
let compose' (depth, heap) =
let go = primrec depth with
Zero => arb
| Suc ih => fun (length, idxs) =>
- let update = fun i => ih (Suc length, fun j =>
- if j == length then i else idxs j)
+ let update =
+ fun i => ih (Suc length, fun j =>
+ if j == length then i else idxs j)
match heap (length, idxs) with
Leaf i => update i
| Branch (i, j) => fun x => update i (update j x)
- in go
+ in go (Zero, arb)
\end{systemt}
\vspace{-\baselineskip}
\end{listing}