of<A, B> function

TaskEither<A, B> of<A, B>(
  1. B value
)

Shorthand for creating a Right value wrapped in a TaskEither.

Example:

final myTask = of<String, int>(15);

Implementation

TaskEither<A, B> of<A, B>(B value) {
  return right(value);
}