[Haskell-cafe] csv one-liner
wman
666wman at gmail.com
Tue Sep 30 15:46:57 EDT 2008
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"
and am sincerely hoping he will try to decypher it's meaning ;-)))
On Tue, Sep 30, 2008 at 9:01 PM, Simon Brenner <olsner at gmail.com> wrote:
> Something like this perhaps:
>
> writeFile "output.csv" . printCSV . map updateLine . fromRight =<<
> parseCSVFromFile "input.csv"
>
> (with fromRight = either (error "fromRight :: Left") id or something
> equivalent)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080930/139c36b1/attachment.htm
More information about the Haskell-Cafe
mailing list