[Haskell-cafe] csv one-liner

Henning Thielemann lemming at henning-thielemann.de
Tue Sep 30 16:07:07 EDT 2008


On Tue, 30 Sep 2008, wman wrote:

> Thanks a lot, I've had a hunch it was possible to get rid of those those
> liftM's. I turned it into:
>
> (writeFile "output.csv") . printCSV . (map updateLine) . (either (error "Chyba pri cteni CSV.") id) =<< parseCSVFromFile "input.csv"

You may even remove parentheses around 'writeFile', 'map' and 'either'.


More information about the Haskell-Cafe mailing list