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

Gene A yumagene at gmail.com
Mon Aug 21 19:31:42 EDT 2006


hi,
 Now, is there a speed or "cleaness of code" advantage to using the
function composition method using (.) :
   putStrLn . return . head $ "This and that"
over the application method...using ($):
   putStrLn $ return $ head "this and that"

some thoughts on that ... they both work.. but any advantage or disadvantage
to one over the other.. I find a lot of these kind of things in
Haskell, and it is purely wonderful.. but always go away wondering if
I am really using the most efficient, or most acceptable method..
gene


More information about the Haskell-Cafe mailing list