Implements tail recursion without overflowing the stack
JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README
Recurse.coffee
Recurse.js
Recurse_test.spec.coffee
Recurse_test.spec.js

README

Tail Recursion

Just require recurse.coffee and then call recurse with the initial input and a function that returns the next input and an accumulator in a array or the final value.