liftEither<A1, B1, E1> method

Either<E1, B1> liftEither<A1, B1, E1>(
  1. Either<E1, B1 Function(A1)> fn,
  2. Either<E1, A1> a
)
inherited

Perform the operation fn with the value A in a and wrap with Either<E1, B1> for pipelining.

This needs to exist because the E1 type is needed for correct inference on Either

Implementation

Either<E1, B1> liftEither<A1, B1, E1>(
  Either<E1, B1 Function(A1)> fn,
  Either<E1, A1> a,
) =>
    fn.bind((fn) => a.fmap(fn));