mirror of
https://github.com/correl/calrissian.git
synced 2024-11-23 11:09:58 +00:00
Fix state-transformer:modify-and-return
The method was returning a single value, rather than the necessary tuple required for binding to work.
This commit is contained in:
parent
d399492679
commit
76ffe600ef
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
(defmodule state-transformer
|
||||
(behaviour monad)
|
||||
(export all))
|
||||
|
||||
(include-lib "include/monads.lfe")
|
||||
|
@ -38,7 +37,8 @@
|
|||
(defun modify-and-return
|
||||
((f (tuple 'state-transformer inner-monad))
|
||||
(lambda (s)
|
||||
(call inner-monad 'return (funcall f s)))))
|
||||
(let ((newstate (call inner-monad 'return (funcall f s))))
|
||||
(tuple newstate newstate)))))
|
||||
|
||||
(defun eval
|
||||
((m s (tuple 'state-transformer inner-monad))
|
||||
|
|
Loading…
Reference in a new issue