Inverts the given function result.

Type signature

(f: (...xs: unknown[]) => unknown) => (...args: unknown[]) => boolean

Examples

not(x > 10)(15);
// ⇒ true
Try in REPL

Questions

  • How to invert a boolean function?

TypeScript sourceJavaScript source