[Haskell-cafe] Re: Useful: putCharLn {inspire by the Int->[Char] thread

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon Aug 21 04:32:58 EDT 2006

> On 8/19/06, Henk-Jan van Tuyl <hjgtuyl at chello.nl> wrote:
> >Or you could use:
> >   putStrLn [head "This and that"]
> Gotta say I really like this ... running the head function inside of the 
> list...
> Okay so I can really learn something here... what would that look like
> in "raw" monadic notation?
> using bind and such notation... >>=  etc..
> hey, mention was made of lists being monads.. so ....

    putStrLn . return . head $ "This and that"

-- Don

More information about the Haskell-Cafe mailing list