
18 Jun
2013
18 Jun
'13
2:51 p.m.
`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/Cont... [2] http://www.haskell.org/hoogle/ [3] http://holumbus.fh-wedel.de/hayoo/hayoo.html