@thi.ng/transducers
Version:
Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations
17 lines (16 loc) • 330 B
JavaScript
import { juxt } from "@thi.ng/compose/juxt";
import { map } from "./map.js";
import { step } from "./step.js";
function multiplex(...args) {
return map(
juxt.apply(
null,
args.map(
(xf) => Array.isArray(xf) ? step(xf[0], xf[1], false) : step(xf, true, false)
)
)
);
}
export {
multiplex
};