[Haskell-cafe] csv one-liner

Andrew Coppin andrewcoppin at btinternet.com
Wed Oct 1 15:51:12 EDT 2008


wman wrote:
> Long story short, I promised him a one-liner to "show the power and 
> beauty of Haskell".
>
> (writeFile "output.csv") =<< (liftM printCSV $ liftM (map updateLine) 
> $ parseCSVFromFile "input.csv")
>
> Is there room for improvement ?

Um... Does anybody else find it interesting that we are "showing the 
beauty of Haskell" by attempting to construct the most terse, cryptic, 
unmaintainable tangle of point-free code that the combined mindpower of 
the entire mailing list can produce?

Yes, there is much to be said for the power and brevity of Haskell. But 
you *can* go over the top here, people! o_O

Keep it short _yet comprehensible_, IMHO.



More information about the Haskell-Cafe mailing list