Skip to content

Instantly share code, notes, and snippets.

@gerardpaapu
Created January 26, 2010 08:29
Show Gist options
  • Save gerardpaapu/286671 to your computer and use it in GitHub Desktop.
Save gerardpaapu/286671 to your computer and use it in GitHub Desktop.
function plus(a, b) { return a + b; }
Seq.iter(1, curry(plus, 1))
// the series of all positive integers
Seq.iter(1, 1, plus) // the fibonacci series
Seq.repeat(1) // 1, 1, 1, 1, ...
Seq.cycle(1, 2, 3) // 1, 2, 3, 1, 2, 3, 1, 2, ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment