Skip to content

Instantly share code, notes, and snippets.

View OnesimusUnbound's full-sized avatar
😃

Marcelino Deseo OnesimusUnbound

😃
View GitHub Profile
@OnesimusUnbound
OnesimusUnbound / Coffeescript Modules
Last active September 25, 2015 09:38
Generator mixin's for underscore.js
/**
* counter
* =======
* Creates counter that will generate number, starting from `start` (default to 0)
* incrementing (or decrementing) by `step` (default to 1). Based on
* [Python's itertools.count](http://docs.python.org/library/itertools.html#itertools.count).
*
* cycle
* =====
* Returns a function that will generate items in `iterable` for each call,