[Haskell-beginners] iterateM

Lukas Braun koomi at hackerspace-bamberg.de
Tue Jun 18 20:51:01 CEST 2013


`iterateM_` is in the monad-loops package[1].
Like you suggested, this version returns `m b` and doesn't build up any
list at all.

You can search for functions by name and even type signature on
Hackage[2] or Hayoo[3].

On a different note, for code such as your `iterateM` you should use
do-notation instead of manually writing out the lambdas. It's much
easier on the eyes and this is what do-notation is there for.

[1] http://hackage.haskell.org/packages/archive/monad-loops/latest/doc/html/Control-Monad-Loops.html#v:iterateM_
[2] http://www.haskell.org/hoogle/
[3] http://holumbus.fh-wedel.de/hayoo/hayoo.html



More information about the Beginners mailing list