Local definition

We may use the $let$ and $where$ terms to introduce local definitions, which are only valid on the right hand side of the equation that we are writing:


f x = a + 1 where a = x / 2
-- or
f x = let a = x / 2 in a + 1

-- Several definitions
f x = square (successor x) where
	square z =  z * z ; successor x = x + 1