diff options
Diffstat (limited to 'algebraic-structures.alternative.scm')
-rw-r--r-- | algebraic-structures.alternative.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/algebraic-structures.alternative.scm b/algebraic-structures.alternative.scm new file mode 100644 index 0000000..c397304 --- /dev/null +++ b/algebraic-structures.alternative.scm @@ -0,0 +1,10 @@ +(functor ((algebraic-structures alternative) (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))) |