[Haskell-beginners] [IO String] to IO [String]
Lyndon Maydwell
maydwell at gmail.com
Sun Mar 31 13:52:13 CEST 2013
Depending on what you're doing with the lines, it may be worth checking out
the `interact` function as well :-)
On Sun, Mar 31, 2013 at 7:42 PM, Kim-Ee Yeoh <ky3 at atamo.com> wrote:
> 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
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130331/412e2f56/attachment.htm>
More information about the Beginners
mailing list