io_length.hs 104 B

12345678
  1. -- Slide 57
  2. ioLength::IO Int
  3. ioLength = do
  4. x <- getLine
  5. return (length x)
  6. main = ioLength >>= print