aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2018-11-13 14:30:13 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2018-11-13 14:30:13 +0100
commit8405fc67cffa8d392508a91c8606670c986b6543 (patch)
tree9db0e33fe48646402bc82a1759862cee02508383
parentAdd simple stateful stack implementation. (diff)
downloadscheme-monad-8405fc67cffa8d392508a91c8606670c986b6543.tar.gz
scheme-monad-8405fc67cffa8d392508a91c8606670c986b6543.tar.xz
Slight (control monad state) changes.
-rw-r--r--control/monad/state.scm9
1 files changed, 2 insertions, 7 deletions
diff --git a/control/monad/state.scm b/control/monad/state.scm
index 1097567..72a3041 100644
--- a/control/monad/state.scm
+++ b/control/monad/state.scm
@@ -2,12 +2,7 @@
#:use-module (oop goops)
#:use-module (ice-9 match)
#:use-module (control monad)
- #:export (return-state run-state
- get put
- ;; TODO
- ;; should these even be exported?
- define-stateful
- define-stateful-method)
+ #:export (return-state run-state get put)
#:re-export (>>= >>))
@@ -47,7 +42,7 @@
(make-state
(lambda (st) body ...))))
-(define-stateful-method ((>>= (st <state>) f) st-list)
+(define-stateful-method ((>>= (st <state>) (f <procedure>)) st-list)
(let ((new-st-list ((proc st) st-list)))
(match new-st-list
((v _)