aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/rosetta/variadic_fixed-point_combinator.bruijn
diff options
context:
space:
mode:
Diffstat (limited to 'samples/rosetta/variadic_fixed-point_combinator.bruijn')
-rw-r--r--samples/rosetta/variadic_fixed-point_combinator.bruijn4
1 files changed, 4 insertions, 0 deletions
diff --git a/samples/rosetta/variadic_fixed-point_combinator.bruijn b/samples/rosetta/variadic_fixed-point_combinator.bruijn
index f5d6ec8..f781641 100644
--- a/samples/rosetta/variadic_fixed-point_combinator.bruijn
+++ b/samples/rosetta/variadic_fixed-point_combinator.bruijn
@@ -35,6 +35,7 @@ mod3 ^(explicit-y* (zero : (one : {}two)))
# passes all functions explicitly
# requires a tuple mapping function first
+# or, minified: [[0 0] [[2 (1 1 0) 0]]] (38 bit!)
tupled-y* [y [[2 (1 0) 0]]]
# merged even odd
@@ -55,6 +56,9 @@ mod3 tupled-y* map [0 zero one two] [[[2]]]
:test ((mod3 (+5)) =? (+2)) ([[1]])
+# NOTE: You can merge the mapping argument directly into the list
+# like [[0 (1 A) (1 B) (1 C) ...]]. Then y*=y.
+
# ---------------
# implicit Church
# ---------------