diff --git a/syndicate/HOWITWORKS.md b/syndicate/HOWITWORKS.md index 6b637f5..871966a 100644 --- a/syndicate/HOWITWORKS.md +++ b/syndicate/HOWITWORKS.md @@ -187,7 +187,7 @@ functions and caches of currently-asserted values. Index = Bag(V) × Node Node = Continuation × (Selector ⟼ Class ⟼ Node) Selector = 𝐍 × 𝐍 -- pop-count and index - Class = X × 𝐍 -- label and arity + Class = X -- label Continuation = 𝒫(V) × ([H] ⟼ [V] ⟼ Leaf) Leaf = 𝒫(V) × ([H] ⟼ Handler) @@ -253,12 +253,11 @@ cases where handlers are dynamically installed. projectMany v [h_0, ...] = [project v h_0, ...] **Definition.** The `classof` function extracts the constructor label - `x` and its arity `i` from a value `v`, yielding `()` if `v` is not - a record. + `x` from a value `v`, yielding `()` if `v` is not a record. classof :: V -> 1 + Class classof a = () - classof x(v_0, ..., v_i) = (x,i) + classof x(v_0, ..., v_i) = x **Definition.** The `extend` procedure augments an index with shape information `s`, by imperatively updating the index structure. It @@ -286,7 +285,7 @@ cases where handlers are dynamically installed. walk-node h node n_pop n_index x(s_0, ... s_i) = let (cont, edges) = node let selector = (n_pop,n_index) - let class = (x,i) + let class = x if selector not in edges then edges[selector] := {} let table = edges[selector]