Sfoglia il codice sorgente

Implement the exercice with the `do` keyword

DricomDragon 5 anni fa
parent
commit
3f8d0a1fa2
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  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