Either type represents a value that can be one of two types: Right<A> (success) or Left<E> (failure).
Type Definition
Constructors
right
Creates a successfulEither containing a value.
left
Creates a failedEither containing an error.
fromNullable
Converts a nullable value to anEither.
fromOption
Converts anOption to an Either.
Operations
map
Transforms the success value.mapLeft
Transforms the error value.flatMap
Sequences computations that returnEither values.
match
Pattern matches on anEither.