Skip to content

Instantly share code, notes, and snippets.

@ekhall
Created March 7, 2014 20:27
Show Gist options
  • Save ekhall/9419344 to your computer and use it in GitHub Desktop.
Save ekhall/9419344 to your computer and use it in GitHub Desktop.
iex> Stream.unfold({0,1}, fn {f1,f2} -> {f1, {f2, f1+f2}} end) |> Enum.take(15)
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment