Do<E, A> function

Either<E, A> Do<E, A>(
  1. DoFunction<E, A> f
)

Implementation

Either<E, A> Do<E, A>(DoFunction<E, A> f) {
  try {
    return right(f(_doAdapter<E>()));
  } on Left catch (e) {
    return left(e.value);
  }
}