Newsgroups: fa.haskell
From: apfel...@quantentunnel.de
Date: Mon, 02 Oct 2006 16:46:04 UTC
Local: Mon, Oct 2 2006 12:46 pm
Subject: [Haskell-cafe] Re: How would you replace a field in a CSV file?
Pete Kazmier wrote: How about > import Data.ByteString.Lazy.Char8 as B hiding (map,foldr) > import Data.List (map) > import Data.Map as M hiding (map) > -- This will be populated from a file > main = B.interact $ B.unlines . map doline . B.lines > -- f is supplied the index of the current element being processed import Data.ByteString.Lazy.Char8 as B hiding (map,foldr) dict = M.singleton (B.pack "Pete") (B.pack "Kazmier") main = B.interact $ B.unlines . map doline . B.lines Note that fixup9 is shared intentionally across different invocations of Also note that because (compare :: (Byte)String -> ..) takes time In any case, tries are *the* natural data structure for (in)finite maps Ralf Hinze. Generalizing generalized tries. Journal of Functional Regards, _______________________________________________ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||