diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2018-11-13 14:30:13 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2018-11-13 14:30:13 +0100 |
commit | 8405fc67cffa8d392508a91c8606670c986b6543 (patch) | |
tree | 9db0e33fe48646402bc82a1759862cee02508383 | |
parent | Add simple stateful stack implementation. (diff) | |
download | scheme-monad-8405fc67cffa8d392508a91c8606670c986b6543.tar.gz scheme-monad-8405fc67cffa8d392508a91c8606670c986b6543.tar.xz |
Slight (control monad state) changes.
-rw-r--r-- | control/monad/state.scm | 9 |
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 _) |