1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/documentation/js/range_comprehensions.js
2010-10-19 21:59:13 -04:00

21 lines
No EOL
496 B
JavaScript

var _result, countdown, deliverEggs, num;
countdown = (function() {
_result = [];
for (num = 10; num >= 1; num--) {
_result.push(num);
}
num--;
return _result;
})();
deliverEggs = function() {
var _ref, _result2, dozen, i;
_result2 = [];
for (i = 0, _ref = eggs.length; (0 <= _ref ? i < _ref : i > _ref); i += 12) {
_result2.push((function() {
dozen = eggs.slice(i, i + 12);
return deliver(new eggCarton(dozen));
})());
}
i -= 12;
return _result2;
};