summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--txr.110
1 files changed, 10 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index c193efd2..b23961d7 100644
--- a/txr.1
+++ b/txr.1
@@ -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 )