Local Definitions
sumSquares2 x y =
let
a = x ^ 2
b = y ^ 2
in
a + b
ghci> sumSquares2 2 5
29sumSquaresM5 x y =
let
sum = a + b
in
mod sum 5 == 0 -- (mod) is the modulo operator
where
a = x ^ 2
b = y ^ 2Last updated