effect-io-ai

Package: effect
Module: Either

Either.orElse

Returns self if it is a Right or that otherwise.

Signature

declare const orElse: { <E, A2, E2>(that: (left: E) => Either<A2, E2>): <A>(self: Either<A, E>) => Either<A | A2, E2>; <A, E, A2, E2>(self: Either<A, E>, that: (left: E) => Either<A2, E2>): Either<A | A2, E2>; }

Source

Since v2.0.0