Re: Doing IO in foldr repeats lines?

2001-01-23 Thread Andreas Rossberg
Ian Lynagh wrote: main :: IO() main = do _ - foldl foo (return 14) ["qq\n", "ww\n", "ee\n"] putStr "" foo :: IO Int - String - IO Int foo io_l s = do l - io_l () - putStr s io_l prints (with both GHC and hugs): qq ww qq ee qq

Doing IO in foldr repeats lines?

2001-01-20 Thread Ian Lynagh
Hi all The following code: module Main (main) where import IO main :: IO()

Re: Doing IO in foldr repeats lines?

2001-01-20 Thread Scott Turner
At 21:17 2001-01-20 +, Ian Lynagh wrote: main = do _ - foldl foo (return 14) ["qq\n", "ww\n", "ee\n"] putStr "" foo :: IO Int - String - IO Int foo io_l s = do l - io_l

Re: Doing IO in foldr repeats lines?

2001-01-20 Thread Ian Lynagh
On Sat, Jan 20, 2001 at 05:08:48PM -0500, Scott Turner wrote: At 21:17 2001-01-20 +, Ian Lynagh wrote: main = do _ - foldl foo (return 14) ["qq\n", "ww\n", "ee\n"] putStr "" foo :: IO Int - String -