jashkenas--coffeescript/documentation/js/range_comprehensions.js

22 lines
480 B
JavaScript
Raw Normal View History

2010-01-05 03:19:45 +00:00
(function(){
var _a, countdown, deliverEggs, num;
countdown = (function() {
_a = [];
for (num = 10; num >= 1; num--) {
2010-02-21 16:45:03 +00:00
_a.push(num);
}
2010-02-21 16:45:03 +00:00
return _a;
2010-04-11 21:57:29 +00:00
})();
deliverEggs = function() {
var _b, _c, dozen, i;
_b = []; _c = eggs.length;
for (i = 0; (0 <= _c ? i < _c : i > _c); i += 12) {
_b.push((function() {
dozen = eggs.slice(i, i + 12);
return deliver(new eggCarton(dozen));
2010-04-11 21:57:29 +00:00
})());
}
return _b;
};
2010-02-24 23:27:10 +00:00
})();