Working with functions
1 2 3 4 5 6 7 8
add :: Int -> Int add x y = x + y multiply :: Int -> Int -> Int multiply x y = x * y f :: Int -> Int f x = 2 * x + 1
Note that f is a function that multiplies its argument by 2 followed by incrementing it by 1. Note that instead of reusing the existing add and multiply functions, we had declared an entirely new function.