mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
8 lines
131 B
Idris
8 lines
131 B
Idris
|
%builtin Natural Nat
|
||
|
|
||
|
natToInt : Nat -> Integer
|
||
|
natToInt Z = 0
|
||
|
natToInt (S k) = 1 + natToInt k
|
||
|
|
||
|
%builtin NaturalToInteger natToInt
|