[Haskell-beginners] [IO String] to IO [String]

Kim-Ee Yeoh ky3 at atamo.com
Sun Mar 31 13:42:36 CEST 2013


On Sun, Mar 31, 2013 at 5:19 PM, Ovidiu D <ovidiudeac at gmail.com> wrote:
> I would like to make this function to have the signature
> f : IO [String]
> ...such that I can get rid of the IO monad and pass the pure string list to
> the processing function.

You could use:

getContents >>= lines :: IO [String]

-- Kim-Ee



More information about the Beginners mailing list