I have this code:
log.error(r.reason) for r in results when r.state == 'rejected'
which translates into:
var r, _i, _len, _results;
_results = [];
for (_i = 0, _len = results.length; _i < _len; _i++) {
r = results[_i];
if (r.state === 'rejected') {
_results.push(log.error(r.reason));
}
}
return _results;
I do not need to accumulate the results of log.error, I just need to print an error for each appropriate element of the array. How is this done in coffeescript?