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\",\"goose\""
 
in the list of lists:
 
[["1","cat","dog"],["2","duck","goose"]]
 
I've tried to mix recursion, pattern matching and list comprehension, but the obtained result was embarrassing complex (> 20 lines of awful code). I think that a more simple solution certainly exists. 

 
Thanks in advance for any idea.
 
Luca


Download Messenger onto your mobile for free. Learn more.