[Haskell-cafe] Re: Composing monads

Thomas Schilling nominolo at googlemail.com
Fri Nov 23 17:25:56 EST 2007


On Fri, 2007-11-23 at 23:01 +0100, Roberto Zunino wrote:
> Maurí­cio wrote:
> > main = mapM_ ((putStrLn "") >*> putStrLn) $
> >           map show [1,2,3]
> 
> Using only standard combinators:
> 
> main = mapM_ ((putStrLn "" >>) . putStrLn) $ map show [1,2,3]

  == mapM_ ((putStrLn "" >>) . putStrLn . show) [1,2,3]

  == mapM_ ((putStrLn "" >>) . print) [1,2,3]



More information about the Haskell-Cafe mailing list