effect-io-ai

Package: effect
Module: Predicate

Predicate.not

Negates a predicate.

When to use

Use when you want the inverse of an existing predicate.

Details

Returns a new predicate that flips the boolean result.

Example (Negating a predicate)

import { Predicate } from "effect"

const isNotString = Predicate.not(Predicate.isString)

console.log(isNotString(1))

See

Signature

declare const not: <A>(self: Predicate<A>) => Predicate<A>

Source

Since v2.0.0