diff options
| author | 2025-02-15 18:55:27 -0500 | |
|---|---|---|
| committer | 2025-02-15 18:55:27 -0500 | |
| commit | 735f45c37274b5ef3801a4f1973919e95a9d5386 (patch) | |
| tree | f15a84d61b365515a1d85dfab5c90065850f850a /doc/mcgoron.weight-balanced-trees.internal.scm | |
| parent | update to new test runner (diff) | |
add node->generator
Diffstat (limited to 'doc/mcgoron.weight-balanced-trees.internal.scm')
| -rw-r--r-- | doc/mcgoron.weight-balanced-trees.internal.scm | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/doc/mcgoron.weight-balanced-trees.internal.scm b/doc/mcgoron.weight-balanced-trees.internal.scm index a48cb23..12d7e6e 100644 --- a/doc/mcgoron.weight-balanced-trees.internal.scm +++ b/doc/mcgoron.weight-balanced-trees.internal.scm @@ -126,7 +126,7 @@ resulting node is inserted into the tree. ")) ((name . "delete") (signature - lambda ((comparator? cmp) element (balanced? set)) balanced?) + lambda ((comparator? cmp) (balanced? set) element) balanced?) (desc " * It is an error if `cmp` does not order the elements of `set` and the value `element`. @@ -134,6 +134,17 @@ resulting node is inserted into the tree. Search `set` for an element `E` that compares equal to `element`. If `E` is found, the returned tree does not have `E`. Otherwise the returned tree has the same number of elements.")) + ((name . "insert") + (signature + lambda ((comparator? cmp) (balanced? set) element) balanced?) + (desc " +* It is an error if `cmp` does not order the elements of `set` and the + value `element`. + +Search `set` for an element `E` that compares equal to `element`. If `E` +is found, the return tree element will have `E` replaced with `element`. +Otherwise, the returned tree will have `element` in addition to the rest +of the values in the tree.")) ((name . "every") (signature lambda ((procedure? predicate?) (wb-tree-node? tree)) *) @@ -141,4 +152,12 @@ tree has the same number of elements.")) (predicate? lambda (*) *)) (desc " Calls `predicate?` on each element of `tree` in an arbitrary order. If all -calls return a truthy value, return a truthy value. Otherwise return `#f`.")))
\ No newline at end of file +calls return a truthy value, return a truthy value. Otherwise return `#f`.")) + ((name . "node->generator") + (signature + lambda ((balanced? node)) procedure?) + (subsigs + (return lambda () *)) + (desc " +Returns a generator (see SRFI-158) that generates the elements of `node` +in arbitrary order.")))
\ No newline at end of file |
