Skip to content

Instantly share code, notes, and snippets.

@bresson
Created March 17, 2017 01:07
Show Gist options
  • Save bresson/49bec84cb3ccb98fba78a7d970c17616 to your computer and use it in GitHub Desktop.
Save bresson/49bec84cb3ccb98fba78a7d970c17616 to your computer and use it in GitHub Desktop.
Erlang
-module(fibonacci).
-export([fibonacci/1]).
fibonacci(0) ->
0;
fibonacci(1) ->
1;
fibonacci(X) ->
fibonacci(X - 1) + fibonacci(X - 2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment