Idris2/tests/refc/issue1778/Reverse.idr
2022-01-20 14:10:57 +00:00

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