[Haskell-beginners] A basic misunderstanding of how to program
ozgurakgun at gmail.com
Sat May 8 12:09:53 EDT 2010
I might have misunderstood you, but what about using the existing interact
And for your interact, since it is not in the IO monad, you cannot write
such a function. [ don't tell him about the unsafePerformIO :) ]
I am sure you'll get better answers.
On 8 May 2010 16:55, Ken Overton <koverton at lab49.com> wrote:
> Sorry for such a beginner-y question, but is there a way to make a function
> interact :: String -> Resp
> interact txt =
> putStrLn txt
> rsp <- getLine
> return parseResp rsp
> parseResp :: String -> Resp
> Or is that simply a wrong way of programming in Haskell with IO?
> Thanks (and apologies),
> -- kov_______________________________________________
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners