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

Niklas Broberg niklas.broberg at gmail.com
Sat Aug 19 14:03:56 EDT 2006


> > c2Str c = c:[]
>
> This function is often known as box, its much more general than char
> to string, it puts any single element in a list like box

... or 'return', which is in the Prelude already, but which is even
more general, it puts any single element into any (dare I say it)
monad, where a list is one example. :-)

/Niklas


More information about the Haskell-Cafe mailing list