Fix overArgs example

This commit is contained in:
atomiks
2018-01-31 18:17:06 +10:00
committed by GitHub
parent 4b0dee99c5
commit df9438e6a8

View File

@ -9,11 +9,9 @@ const overArgs = (fn, transforms) => (...args) => fn(...args.map((val, i) => tra
``` ```
```js ```js
var func = overArgs( const square = n => n * n;
function(x, y) { const double = n => n * 2;
return [x, y];
}, const fn = overArgs((x, y) => [x, y], [square, doubled]);
[square, doubled] fn(9, 3); // [81, 6]
);
func(9, 3); // [81, 6]
``` ```