aboutsummaryrefslogtreecommitdiff
path: root/algebraic-structures.alternative.make.scm
blob: 29f8352fd152dae694b0defb55f36a3c9cc87f9f (about) (plain)
1
2
3
4
5
6
7
8
9
10
(functor ((algebraic-structures 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)))