indyelixir / fibonacci

An Elixir interface to the Fibonacci series.
1 stars 1 forks source link

Take advantage of Elixir's tail-call optimization #2

Closed stevegrossi closed 8 years ago

janxious commented 8 years ago

This is an example of using the TCO feature: https://github.com/stevegrossi/fibonacci/pull/1/commits/367ad91dbd14995f75d2018c8cbea74f3a9e0165

stevegrossi commented 8 years ago

Indeed, and this ended up becoming a non-issue with the switch to using Stream.unfold/2 from Elixir's standard library.