... and the same in stratified javascript:
var seq = require('sjs:sequence');
var dataSet = ['This', 'is', 'how', 'we', 'do', 'it'];
var lyrics = dataSet ..
seq.map.par(3, function(x) {
hold(Math.floor(Math.random()*1000)+1);
return x + '♪';
});
console.log('Finished processing all the data');
console.log(lyrics);
... and the same in stratified javascript: var seq = require('sjs:sequence'); var dataSet = ['This', 'is', 'how', 'we', 'do', 'it']; var lyrics = dataSet .. seq.map.par(3, function(x) { hold(Math.floor(Math.random()*1000)+1); return x + '♪'; }); console.log('Finished processing all the data'); console.log(lyrics);