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

22 lines
608 B
JavaScript
Raw Normal View History

2010-01-04 22:19:45 -05:00
(function(){
2010-05-15 01:18:05 -04:00
var _a, _b, _c, countdown, egg_delivery, num;
countdown = (function() {
2010-05-15 01:18:05 -04:00
_a = []; _b = 10; _c = 1;
for (num = _b; (_b <= _c ? num <= _c : num >= _c); (_b <= _c ? num += 1 : num -= 1)) {
2010-02-21 11:45:03 -05:00
_a.push(num);
}
2010-02-21 11:45:03 -05:00
return _a;
2010-04-11 17:57:29 -04:00
})();
2010-05-15 01:18:05 -04:00
egg_delivery = function() {
var _d, _e, _f, dozen_eggs, i;
_d = []; _e = 0; _f = eggs.length;
for (i = _e; (_e <= _f ? i < _f : i > _f); (_e <= _f ? i += 12 : i -= 12)) {
_d.push((function() {
dozen_eggs = eggs.slice(i, i + 12);
return deliver(new egg_carton(dozen));
2010-04-11 17:57:29 -04:00
})());
}
2010-05-15 01:18:05 -04:00
return _d;
};
2010-02-24 18:27:10 -05:00
})();