Idris2/tests/idris2/builtin005/Test.idr

8 lines
131 B
Idris
Raw Normal View History

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