Skip to content

Instantly share code, notes, and snippets.

@clooth
Created August 23, 2012 19:08
Show Gist options
  • Save clooth/3440439 to your computer and use it in GitHub Desktop.
Save clooth/3440439 to your computer and use it in GitHub Desktop.
# Process all markers in the bounds provided, using a callback
processAll: (bounds, callback) ->
for x in [bounds.minX..bounds.maxX]
for y in [bounds.minY..bounds.minX]
"foo"
processAll = function(bounds, callback) {
var x, y, _i, _ref, _ref1, _results;
_results = [];
for (x = _i = _ref = bounds.minX, _ref1 = bounds.maxX; _ref <= _ref1 ? _i <= _ref1 : _i >= _ref1; x = _ref <= _ref1 ? ++_i : --_i) {
_results.push((function() {
var _j, _ref2, _ref3, _results1;
_results1 = [];
for (y = _j = _ref2 = bounds.minY, _ref3 = bounds.minX; _ref2 <= _ref3 ? _j <= _ref3 : _j >= _ref3; y = _ref2 <= _ref3 ? ++_j : --_j) {
_results1.push("foo");
}
return _results1;
})());
}
return _results;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment