Re: State monad issue

2013-07-11 Thread JvJ
Yeah it is possible to do it with another domonad block. I just don't want to clutter up the code by repeating myself. I made a macro do-state that introduces a new domonad block using the current state. It works: (defmacro do-state [bindings & r] `(fn [st] ( (domonad state-m ~bindings ~@

Re: State monad issue

2013-07-11 Thread Ben Wolfson
Is it not possible just to put another domonad block in the true branch of the if? Alternately, it should be possible to do it with an explicit bind operation. On Thu, Jul 11, 2013 at 2:11 PM, JvJ wrote: > I'm trying to use a domonad block with the state monad, and I'm running > into trouble ch