1 Oct
2003
1 Oct
'03
3:01 p.m.
On Wed, Oct 01, 2003 at 04:42:51PM +0200, Christian Maeder wrote:
Can actually someone supply an implementation of something like interact that does no pipelining for the argument "id"? Simply doing "putStr !$ f !$ s" was not enough!
The simplest working but not necessarily correct solution could be: interact f = do s <- getContents length s `seq` putStr (f s) This one is probably better: interact f = do s <- getContents foldr seq () s `seq` putStr (f s) And this is more fun ;) : interact f = do s <- getContents foldr seq (putStr (f s)) s
Thanks, Christian
Best regards, Tom -- .signature: Too many levels of symbolic links