On Feb 7, 2008 7:32 AM, Uwe Hollerbach <[EMAIL PROTECTED]> wrote:
> > pure_fn :: Integer -> String
> > pure_fn n = calendarTimeToString (toUTCTime (TOD n 0))
> >
> > make_wicked :: String -> IO String
> > make_wicked str = return str
> >
> > -- use of make_wicked
> > main = (make_wicked (pure_fn 1234567890)) >>= putStrLn
>
> OK, after all that, my original question, in terms of this example:
> "the IO monad is one-way" is equivalent to saying there is no haskell
> function that I could write that would take
>
> > (make_wicked (pure_fn 123456))
>
> and make it into something that could be used in the same way and the
> same places as just plain
>
> > (pure_fn 123456)
>
> ?

Spot on!

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

Reply via email to