[Haskell-cafe] How to put data from a string to a tuple
pradeep at talk.lk
Fri Mar 5 10:52:50 EST 2010
As luke requested
Here is the codes and some more brief explanation. Please help me
getItemFile :: IO String
test <- readFile
im taking a file data to a string
it contains string like "hello,world,I,am,a,new,developer"
so I need to put these each to a tuple. Because the content have Integers
sortList2 :: String -> String
| x == ',' = ""
| otherwise = [x] ++ sortList2 xs
Im breaking word by word from this above function
Now I need to send it to a tuple. Can someone help me how to do it. Is this
possible. Using recursion im checking each word till "," occurs
And taking that string and passing it to the tuple.
Can someone please help me to do it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe