pragmatic-fp-ts
Version:
Opinionated functional programming library with easy use in mind
14 lines (13 loc) • 370 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.juxt = void 0;
function juxt(fns, coll) {
if (arguments.length === 1)
return (_coll) => juxt(fns, _coll);
const n = fns.length;
const result = new Array(n);
for (let i = 0; i < n; ++i)
result[i] = fns[i](coll);
return result;
}
exports.juxt = juxt;