aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--algebraic-structures.monad.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/algebraic-structures.monad.scm b/algebraic-structures.monad.scm
index dd9b850..8e906e3 100644
--- a/algebraic-structures.monad.scm
+++ b/algebraic-structures.monad.scm
@@ -4,6 +4,7 @@
(apply scheme:apply)
(map scheme:map)
(do scheme:do))
+ (chicken base)
M)
(import-for-syntax matchable
(chicken syntax)
@@ -31,8 +32,8 @@
(every symbol? var)
(symbol? let-stx) (compare let-stx (inject 'let-values))
(symbol? =-stx) (compare =-stx (inject '=)))
- `(call-with-values (lambda () ,expr)
- (lambda ,var ,acc)))
+ `(receive ,var ,expr
+ ,acc))
(else
`(>>= ,binding (lambda (_) ,acc))))]
[expr