mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-27 13:40:15 +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
|