mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-26 13:11:30 +03:00
10 lines
223 B
Idris
10 lines
223 B
Idris
reverse : Nat -> Nat
|
|
reverse = reverseOnto 0
|
|
where
|
|
reverseOnto : Nat -> Nat -> Nat
|
|
reverseOnto j 0 = j
|
|
reverseOnto j (S k) = reverseOnto (S j) k
|
|
|
|
main : IO ()
|
|
main = printLn $ reverse $ the Nat 100000
|