
8 May
2010
8 May
'10
12:44 p.m.
On 8 May 2010, at 17:09, Ozgur Akgun wrote:
I might have misunderstood you, but what about using the existing interact function: http://haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Prelude.html#...
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 :) ]
Uh, interact absolutely *is* in the IO monad, and is totally implementable without unsafePerformIO, like this: interact f = putStr =<< f <$> getContents Bob