> splitOnToken :: Eq a => a -> [a] -> [[a]]
> splitOnToken t xs
> = case break (== t) xs of
> (hd,tl) -> hd:case tl of
> (_:r@(_:_)) -> splitOnToken t r
> _ -> []
>
> str2lsts = map (map read . splitOnToken ',') . splitOnToken '§'
>
> if thi
skell-beginners] beginner question
To:
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
Hi all.
Just a very basic question.
I need to write a function str2lsts :: String -> [[String]] in order to
transorm a string like:
"\"1\",\"cat\",\"dog\"§\"2\",\"duck\",\"
Send Beginners mailing list submissions to
beginners@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
beginners-requ...@haskell.org
You can r