Question : creating functions in haskell
Answered by : renz-carillo
add :: Integer -> Integer -> Integer --function declaration
add x y = x + y --function definition
main = do putStrLn "The addition of the two numbers is:" print(add 2 5) --calling a function
Source : https://www.tutorialspoint.com/haskell/haskell_functions.htm | Last Update : Thu, 26 May 22