11 lines
164 B
OCaml
11 lines
164 B
OCaml
|
Printf.printf "hello world!\n"
|
||
|
|
||
|
let rec fac (n : int) : int =
|
||
|
if n <= 1 then
|
||
|
1
|
||
|
else
|
||
|
fac (n-1) * n;;
|
||
|
|
||
|
|
||
|
Printf.printf "fac 6 is %d\n" (fac 6)
|