Add m.prop.sync

This commit is contained in:
Gilbert 2016-07-12 22:57:09 -05:00
parent 7227cc546f
commit 008ffc9587
4 changed files with 90 additions and 1 deletions

View file

@ -174,4 +174,12 @@ function reject(e) {
return stream
}
module.exports = {stream: createStream, combine: combine, reject: reject, HALT: HALT}
function sync (streams) {
return combine(function () {
return Array.prototype.slice
.call(arguments, 0, arguments.length-1)
.map(function (s) { return s() })
}, streams)
}
module.exports = {stream: createStream, sync: sync, combine: combine, reject: reject, HALT: HALT}