Idris2/tests/idris2/builtin/builtin005/Test.idr
2023-09-07 14:57:22 +01:00

8 lines
131 B
Idris

%builtin Natural Nat
natToInt : Nat -> Integer
natToInt Z = 0
natToInt (S k) = 1 + natToInt k
%builtin NaturalToInteger natToInt