effect-io-ai

Package: effect
Module: Predicate

Predicate.nand

Creates a predicate that returns true unless both predicates are true.

When to use

Use when you want to combine two Predicates with logical NAND semantics.

Details

Returns the negation of and.

Example (Checking NAND conditions)

import { Predicate } from "effect"

const notBoth = Predicate.nand(Predicate.isString, Predicate.isNumber)

console.log(notBoth("a"))

See

Signature

declare const nand: { <A>(that: Predicate<A>): (self: Predicate<A>) => Predicate<A>; <A>(self: Predicate<A>, that: Predicate<A>): Predicate<A>; }

Source

Since v2.0.0