A function that takes a function that produces a leftValue and returns a function that
converts an Option into an Either that is Left with the provided value if the option is None,
and Right with the value from Some if the option is Some.
A function that takes a predicate and a function that produces a leftValue.
It returns a function that takes a value and returns an Either that is Right with the provided
value if the predicate returns true for this value, and Left with the provided value if the predicate
returns false.
Returns an Ord instance for comparing Either values based on the provided
orderings for the Left and Right types.
getOrElse<A, B>(BdefaultFunction())
→ B Function(Either<A, B>)
Returns a function that, when provided with an Either<A, B>,
will yield the value inside if it's a Right,
or the result of the defaultFunction if it's a Left.
match<A, B, C>(ConLeft(A), ConRight(B))
→ C Function(Either<A, B>)
Matches an Either<A, B> to execute a function based on its Left or Right value.
Using Dart's pattern matching, the match function provides an expressive
and concise way to handle Either values without manual type checks.
matchW<A, B, C, D>(DonLeft(A), DonRight(B))
→ D Function(Either<A, B>)
Matches the given Either value and returns the result of the respective handler.