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