aboutsummaryrefslogtreecommitdiff
path: root/algebraic-structures.alternative.scm
blob: ffebfc3f593e06a9a99cbd9083f97020db2327f8 (about) (plain)
1
2
3
4
5
6
7
8
9
10
(functor ((algebraic-structures alternative) (A (pure map1 map2 map apply alt empty)))
    (pure map1 map2 map apply alt empty guard)
  (import (except scheme map apply)
          (only (chicken base) void)
          (only A pure map1 map2 map apply alt empty))

  (define (guard b)
    (if b
        (pure (void))
        empty)))