Right<a extends Object?, b extends Object?> class

Inheritance
Available extensions

Constructors

const

Properties

hashCode int
The hash code for this object.
no setteroverride
maybeLeft Maybe<a>
Maybe return the Left value, returning None in case this is Right
no setterinherited
maybeRight Maybe<b>
Maybe return the Right value, returning None in case this is Left
no setterinherited
runtimeType SumRuntimeType
A representation of the runtime type of the object.
no setterinherited

Methods

apply(Applicative<A> a) Applicative<B>

Available on Applicative<B Function(A)>, provided by the ApplicativeApply extension

Equivalent to f <*> a
apply(Either<E, T> arg) Either<E, U>

Available on Either<E, U Function(T)>, provided by the EitherApply extension

Apply the arg arg to this Function only in case both the arg and Function are available.
bimap<A1, B1>({required A1 a(a), required B1 b(b)}) Either<A1, B1>
Map the values A to A1 and B to B1 with the a and b mappers, respectively.
inherited
bind<B1>(covariant Either<a, B1> fn(b)) Either<a, B1>
Flat map the right value B into an Either<A, B1>, while keeping the left value untouched.
inherited
first<A1>(A1 fn(a)) Either<A1, b>
Map the left A value into an A1 with the fn mapper, while keeping the right value untouched.
inherited
fmap<B1>(B1 fn(b p1)) Either<a, B1>
Map the right value B into an Either<A, B1>, while keeping the left value untouched.
inherited
getL(a right(b)) → a
Handle the right value with right and return the left A value.
inherited
getR(b left(a)) → b
Handle the left value with left and return the right B value.
inherited
lift<A, B>(covariant Either<Exception, B Function(A)> fn, covariant Either<Exception, A> a) Either<Exception, B>
Perform the operation fn with the value in a and wrap with Applicative<B> for pipelining.
inherited
liftEither<A1, B1, E1>(Either<E1, B1 Function(A1)> fn, Either<E1, A1> a) Either<E1, B1>
Perform the operation fn with the value A in a and wrap with Either<E1, B1> for pipelining.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pure<T>(T value) Either<a, T>
Wraps the value inside a Applicative<T>
inherited
second<B1>(B1 fn(b)) Either<a, B1>
Map the right B value into an B1 with the fn mapper, while keeping the left value untouched.
inherited
swap() Either<b, a>
inherited
toMaybe() Maybe<T>

Available on Either<Object, T>, provided by the EitherToMaybe extension

toString() String
A string representation of this object.
override
unit<T>(T value) Either<a, T>
Wraps the value with this Monad type.
inherited
visit<R extends Object?>({required R left(a _value), required R right(b _value)}) → R
override

Operators

operator ==(Object other) bool
The equality operator.
override
operator >>(Applicative<A> a) Applicative<B>

Available on Applicative<B Function(A)>, provided by the ApplicativeApply extension

Equivalent to f <*> a
operator >>(Either<E, T> arg) Either<E, U>

Available on Either<E, U Function(T)>, provided by the EitherApply extension

Apply the arg arg to this Function only in case both the arg and Function are available.