Idris2/tests/chez/perf001/Fact.idr

9 lines
121 B
Idris
Raw Normal View History

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