Skip to content

Instantly share code, notes, and snippets.

@wklm
Created August 25, 2017 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wklm/40e8aa939af8ff269a1fdfb60b2f1a7c to your computer and use it in GitHub Desktop.
Save wklm/40e8aa939af8ff269a1fdfb60b2f1a7c to your computer and use it in GitHub Desktop.
ocaml SO
let rec factorial (number : int) =
if number >= 1 then number * factorial (number - 1)
else 1
print_int (factorial 242);;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment