Explorar o código

Implement the exercice with the `do` keyword

DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
3f8d0a1fa2
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      io_length.hs

+ 8 - 0
io_length.hs

@@ -0,0 +1,8 @@
+-- Slide 57
+
+ioLength::IO Int
+ioLength = do
+	x <- getLine
+	return (length x)
+
+main = ioLength >>= print