Update negate.md

This commit is contained in:
Angelos Chalaris
2017-12-24 13:44:04 +02:00
committed by GitHub
parent 353c05904e
commit d158c61b7b

View File

@ -5,10 +5,7 @@ Negates a predicate function.
Take a predicate function and apply `not` to it with its arguments.
```js
const negate = func => (...args) => {
return !func(...args);
}
const negate = func => (...args) => !fun(...args);
// filter([1, 2, 3, 4, 5, 6], negate(isEven)) -> [1, 3, 5]
// negate(isOdd)(1) -> false
```