RosettaCodeData/Task/Synchronous-concurrency/Haskell/synchronous-concurrency-3.hs
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

6 lines
239 B
Haskell

writer takeLine putCount = loop 0
where loop n = do l <- takeLine
case l of
Just x -> do putStrLn x
loop (n+1)
Nothing -> putCount n