aboutsummaryrefslogtreecommitdiff
path: root/algebraic-structs.alternative.make.scm
diff options
context:
space:
mode:
Diffstat (limited to 'algebraic-structs.alternative.make.scm')
-rw-r--r--algebraic-structs.alternative.make.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/algebraic-structs.alternative.make.scm b/algebraic-structs.alternative.make.scm
new file mode 100644
index 0000000..df4e0f4
--- /dev/null
+++ b/algebraic-structs.alternative.make.scm
@@ -0,0 +1,10 @@
+(functor ((algebraic-structs alternative make) (A (pure map map2 alt empty)))
+ (pure map map2 alt empty guard)
+ (import (except scheme map apply)
+ (only (chicken base) void)
+ A)
+
+ (define (guard b)
+ (if b
+ (pure (void))
+ empty)))