mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 20:51:43 +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
|