mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-26 21:23:53 +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
|