Idris2/tests/chez/perf001/Fact.idr
2020-10-03 14:39:13 +01:00

9 lines
121 B
Idris

module Main
fact : Nat -> Nat
fact 0 = 1
fact (S k) = (S k) * (fact k)
main : IO ()
main = putStrLn $ show $ fact 1000