Function not

  • Remarks

    Note that this does not act on a boolean value. Rather, it wraps a function with a boolean return value so that it returns the complement of what the wrapped function would.

    Example

    import * as L from "flurp/logic";

    const notFive = L.not(L.equals(5));
    notFive(5); // false
    notFive(4); // true

    Type Parameters

    • T extends ((...args: never[]) => boolean)

    Parameters

    • f: T

      must return a boolean

    Returns ((...args: Parameters<T>) => boolean)

      • (...args: Parameters<T>): boolean
      • Parameters

        • Rest ...args: Parameters<T>

        Returns boolean