Files
Chris Tate c257368c5e Compile Effect generators statically (#589)
* Compile Effect generators statically

* test: declare the dormant array write's expected fence
2026-09-30 14:25:29 -05:00

8 lines
270 B
JavaScript

function dispatch(arity, body) {
if (arity === 2) return function(a, b) { return body(a, b); };
return function(a, b, c, d, e) {
return body(a, b, c, d, e, ...arguments);
};
}
export const factory = map => dispatch(2, (left, right) => map(left) + map(right));