isEven:num -> boolean
as follows:
isEven:num -> bool; isEven(n) <= if n mod 2 = 0 then true else false;or even more simply as
isEven:num -> bool; isEven(n) <= n mod 2 = 0;or we could use the previously defined
isOdd
function:
isEven:num -> bool; isEven(n) <= not (isOdd(n));