Comment by more_original
14 years ago
Yes, printf is easy in F#. The following example works in F# and OCaml:
let rec fact n =
Printf.printf "%i\n" n;
if n = 0 then 1 else n * (fact (n-1))
14 years ago
Yes, printf is easy in F#. The following example works in F# and OCaml:
let rec fact n =
Printf.printf "%i\n" n;
if n = 0 then 1 else n * (fact (n-1))
No comments yet
Contribute on Hacker News ↗