effect-io-ai

Package: effect
Module: STM

STM.cond

Similar to Either.cond, evaluate the predicate, return the given A as success if predicate returns true, and the given E as error otherwise

Signature

declare const cond: <A, E>(predicate: LazyArg<boolean>, error: LazyArg<E>, result: LazyArg<A>) => STM<A, E>

Source

Since v2.0.0