[ create a new paste ] login | about

Link: http://codepad.org/Guukn3Ho    [ raw code | output | fork ]

Haskell, pasted on Jan 22:
1
2
3
4
5
6
7
8
9
10
11
12
main = do
         x <- readNum
         if x == 42
           then putStr("")
           else do
             putStr  (show (x) ++ "\n")
             main
       where
         readNum :: IO Integer
         readNum = do
           line <- getLine
           readIO line


Output:
1
2

Program error: <stdin>: IO.hGetChar: end of file (end of file)


Create a new paste based on this one


Comments: