aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <cbeok@protonmail.com>2020-07-10 08:13:04 -0500
committerColin Okay <cbeok@protonmail.com>2020-07-10 08:13:04 -0500
commit389582c4d1e18de495e05c48e9309ba668147705 (patch)
tree08992c77f3d8a85444474ade1738d1b3b7bf8986
parent09bab9fc37e2de8fe6d8821f1258290f8100c386 (diff)
Note on experimental combinators in readme
-rw-r--r--README.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/README.md b/README.md
index b5616a1..0961490 100644
--- a/README.md
+++ b/README.md
@@ -176,7 +176,7 @@ Here is a brief listing of the other generator constructors in GTWIWTG:
- `(repeater &rest args)` repeats its arguments in order, looping forever.
- `(noise &optional (arg 1.0))` an infinite sequence of random numbers
- `(from-thunk thunk)` an infinite sequence of calls to `(funcall thunk)`
-- `(from-thunk-until thunk until)` like `from-thunk`, but stops when `(funcall until)` is non nil
+- `(from-thunk-until thunk &optional until clean-up)` like `from-thunk`, but stops when `(funcall until)` is non nil. Runs the thunk `clean-up` when done.
- `(from-thunk-times thunk n)` like `from-thunk` but stops after `n` times.
- `(from-recurrence fn n-1 &rest n-m)` generate using a recurrence relation
- `(from-input-stream stream reader)` turn a stream into a generator
@@ -253,6 +253,17 @@ Here are some simple examples of their use:
- `(skip-while! pred gen)` produces a generator by skippng elements of `gen` while `pred` is `t`
- `(merge! comp gen1 gen2 &rest gens)` emulates the behavior of `merge` but for generators
+And some experimental tools:
+
+- `(nfurcate! n gen)` returns a list of `n` new generators, each
+ producing the same elements as of `gen`.
+- `(partition! pred gen)` returns a list of two new generators, the
+ first generating the memebers of `gen` that pass the predicate
+ `pred`, and the second generating those that don't.
+
+Both of the above are marked as EXPERIMENTAL because by consuming the
+generators that the above form produces new memory might be
+consed. See the docstrings.
### The Fundamental Consumer