Merge pull request #585 from Chalarangelo/atomiks-patch-1

Fix overArgs example
This commit is contained in:
Angelos Chalaris
2018-01-31 19:06:09 +02:00
committed by GitHub

View File

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