[Haskell-beginners] iterateM

Karl Voelker ktvoelker at gmail.com
Tue Jun 18 07:28:31 CEST 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130617/df451e61/attachment.htm>


More information about the Beginners mailing list