playground/fstar/hello.fst

8 lines
110 B
Plaintext

module Hello
// let nat = x:int{x >= 0}
let rec factorial n =
if n = 0 then 1
else n * factorial (n-1)