mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-01 01:09:03 +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
|