fork download
  1. main = do
  2. x <- readNum
  3. if x == 42
  4. then putStr("")
  5. else do
  6. putStr (show (x) ++ "\n")
  7. main
  8. where
  9. readNum :: IO Integer
  10. readNum = do
  11. line <- getLine
  12. readIO line
stdin
1
2
10
42
11
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )
Linking prog ...
stdout
1
2
10