Skip to content

Instantly share code, notes, and snippets.

@vasily-kirichenko
Created May 30, 2012 17:40
Show Gist options
  • Save vasily-kirichenko/2837849 to your computer and use it in GitHub Desktop.
Save vasily-kirichenko/2837849 to your computer and use it in GitHub Desktop.
Factorial in Erlang
factorial(0) -> 1;
factorial(N) when N > 0 ->
N * factorial(N-1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment