diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-04-11 18:55:27 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-04-11 18:55:27 -0700 |
commit | 387d9c08e44db206e995bbbf272b7b8ea8580ad7 (patch) | |
tree | 6e73c3f7b19f89d1c5272a4ef7736a92c925fc3c | |
parent | 38d32cd5006286ad87cf92b65df2633ee7f2db6b (diff) | |
download | txr-387d9c08e44db206e995bbbf272b7b8ea8580ad7.tar.gz txr-387d9c08e44db206e995bbbf272b7b8ea8580ad7.tar.bz2 txr-387d9c08e44db206e995bbbf272b7b8ea8580ad7.zip |
* txr.1: Add powerset example under comb function
-rw-r--r-- | txr.1 | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -15916,6 +15916,16 @@ This requirement is not applicable when .meta seq is a hash table. +.TP* Example: +.cblk + ;; powerset function, in terms of comb. + ;; Yields a lazy list of all subsets of s, + ;; expressed as sequences of the same type as s. + + (defun powerset (s) + (mappend* (op comb s) (range 0 (length s)))) +.cble + .coNP Function @ rcomb .synb .mets (rcomb < seq << len ) |