[Haskell-beginners] beginner question

Shawn Willden shawn-haskell at willden.org
Fri Oct 30 11:11:48 EDT 2009


On Friday 30 October 2009 07:40:13 am Luca Ciciriello wrote:
> I need to write a function str2lsts :: String -> [[String]] in order to
> transorm a string like:
>
> "\"1\",\"cat\",\"dog\"§\"2\",\"duck\",\"goose\""
>
> in the list of lists:
>
> [["1","cat","dog"],["2","duck","goose"]]

A variety of solutions on these blog posts, and the comments:

http://gimbo.org.uk/blog/2007/04/20/splitting-a-string-in-haskell/
http://julipedia.blogspot.com/2006/08/split-function-in-haskell.html

	Shawn.


More information about the Beginners mailing list