
18 Jun
2013
18 Jun
'13
1:28 a.m.
I would use the State monad rather than passing the state explicitly. Then the "body of the loop" is of type "m a" rather than "a -> m a", and you can use "sequence . repeat" on it. -Karl