mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-24 06:14:01 +08:00
* Compile Effect generators statically * test: declare the dormant array write's expected fence
8 lines
270 B
JavaScript
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));
|