Files
haskell-programming-tuto/test.hs

11 lines
213 B
Haskell
Raw Normal View History

2017-03-25 17:10:12 +01:00
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!"