UNPKG

@thi.ng/transducers-async

Version:

Async versions of various highly composable transducers, reducers and iterators

17 lines (16 loc) 315 B
import { juxtAsync } from "@thi.ng/compose"; import { map } from "./map.js"; import { step } from "./step.js"; function multiplex(...args) { return map( juxtAsync.apply( null, args.map( (xf) => Array.isArray(xf) ? step(xf[0], xf[1]) : step(xf) ) ) ); } export { multiplex };