Files
haskell-programming-tuto/test.hs
Yves Dubromelle f307cb8d06 commit initial
2017-03-25 17:10:12 +01:00

11 lines
213 B
Haskell

sayHello :: String -> IO ()
sayHello x = putStrLn ("Hello, " ++ x ++ "!")
triple x = x * 3
thirdLetter :: String -> Char
thirdLetter x = x !! 2
letterIndex :: Int -> Char
letterIndex = (!!) "Curry is awesome!"