We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the solution you'd like A function that negates another function. If f(...p) = true then negate(f)(...p) = false and vice versa.
negate
f(...p) = true
negate(f)(...p) = false
Additionally propose a solution Function that negates a function that returns boolean values
Type Signature ((...p) -> Bool) -> ((...p) -> Bool)
((...p) -> Bool) -> ((...p) -> Bool)
Possible implementation const negate = f => R.compose(R.not, f)
const negate = f => R.compose(R.not, f)
Example use cases
const notIn = negate(R.has)
The text was updated successfully, but these errors were encountered:
Looks like complement from ramda library.
Sorry, something went wrong.
No branches or pull requests
Describe the solution you'd like
A function that
negate
s another function. Iff(...p) = true
thennegate(f)(...p) = false
and vice versa.Additionally propose a solution
Function that negates a function that returns boolean values
Type Signature
((...p) -> Bool) -> ((...p) -> Bool)
Possible implementation
const negate = f => R.compose(R.not, f)
Example use cases
The text was updated successfully, but these errors were encountered: