[Haskell-beginners] stream of monadic calculations
daniel.trstenjak at gmail.com
Tue Oct 2 20:13:39 CEST 2012
On Tue, Oct 02, 2012 at 10:12:44AM -0800, Christopher Howard wrote:
> Say I've got a stream of monadic calculations, like so:
> do a' <- f a
> a'' <- g a'
> a''' <- h a''
> return a'''
> There is a cleaner way to do that, yes? (Without using all the tick marks?)
foldM (\a f -> f a) a [f, g, h]
More information about the Beginners