Esempio n. 1
0
File: zip.js Progetto: TylorS/core
export const zipArray = curry2((fn, arrayOfStreams) => {
  const length = arrayOfStreams.length
  return length === 0 ? empty()
    : length === 1 ? map(fn, arrayOfStreams[0])
    : new Stream(new Zip(fn, amap(getSource, arrayOfStreams)))
})
Esempio n. 2
0
File: zip.js Progetto: TylorS/core
function emitZipped (fn, time, buffers, sink) {
  sink.event(time, invoke(fn, amap(head, buffers)))
}