diff --git a/README.md b/README.md index e46490804..17cbcc2f3 100644 --- a/README.md +++ b/README.md @@ -1279,7 +1279,7 @@ Negates a predicate function. Take a predicate function and apply `not` to it with its arguments. ```js -const negate = func => (...args) => !fun(...args); +const negate = func => (...args) => !func(...args); // filter([1, 2, 3, 4, 5, 6], negate(isEven)) -> [1, 3, 5] // negate(isOdd)(1) -> false ``` diff --git a/docs/index.html b/docs/index.html index 03812f49d..c885c091c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -856,7 +856,7 @@ async function sleepyWork() {

negate

Negates a predicate function.

Take a predicate function and apply not to it with its arguments.

-
const negate = func => (...args) => !fun(...args);
+
const negate = func => (...args) => !func(...args);
 // filter([1, 2, 3, 4, 5, 6], negate(isEven)) -> [1, 3, 5]
 // negate(isOdd)(1) -> false