-- returns if a number is even
even :: Nat -> Bool
even Z                     = True
even (S Z)                 = False
even (S (S Z))             = True
even (S (S (S Z)))         = False
even (S (S (S (S Z))))     = True
even (S (S (S (S (S Z))))) = False

-- returns if a number is odd
odd :: Nat -> Bool
odd Z                     = False
odd (S Z)                 = True
odd (S (S Z))             = False
odd (S (S (S Z)))         = True
odd (S (S (S (S Z))))     = False
odd (S (S (S (S (S Z))))) = True
