mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 18:21:47 +03:00
9 lines
121 B
Idris
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
|