Skip to content

Instantly share code, notes, and snippets.

/sequence.js Secret

Created February 19, 2018 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/22d9bc43099eb595ba27b0f31b128edd to your computer and use it in GitHub Desktop.
Save anonymous/22d9bc43099eb595ba27b0f31b128edd to your computer and use it in GitHub Desktop.
function sequence(start = 0, step = 1) {
return function() {
var prevStart = start;
start += step;
return prevStart;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment