Skip to content

Instantly share code, notes, and snippets.

@toddnestor
Created December 7, 2016 07:58
Show Gist options
  • Save toddnestor/1505705513fe3b48dca3a8cae672aac4 to your computer and use it in GitHub Desktop.
Save toddnestor/1505705513fe3b48dca3a8cae672aac4 to your computer and use it in GitHub Desktop.
Fibonaccie sequence in erlang
-module(fibonacci).
-export([process/1]).
process(1) ->
[0];
process(2) ->
[0,1];
process(N) ->
lists:append(process(N - 1), [ lists:last(process(N - 1)) + lists:last(process(N - 2) ) ] ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment