As luke requested

 

Here is the codes and some more brief explanation. Please help me

 

 getItemFile :: IO String

 getItemFile  = 

                                 do

                                                 test <- readFile
"input.txt"

                                                 return test

 

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
and Strings

 

sortList2 :: String -> String

sortList2 (x:xs) 

                | 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. 

 

Please 

 

 

 

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to