import { Arity1, Is, IsNot, pipe } from '@typed/lambda' import { not } from './not' /** * Wrap a function in a negation * @param :: (a -> b) * @returns :: (a -> boolean) */ export const complement: { (fn: Is): IsNot (fn: IsNot): Is (fn: Arity1): Arity1 } = (fn: Arity1) => pipe(fn, not) as any