data Nat = Zero | Succ Nat intValOf thisNat = case thisNat of Zero -> 0 Succ nextNat -> 1 + intValOf nextNat natValOf thisInt = if thisInt == 0 then Zero else Succ (natValOf (thisInt - 1))