reader_task_either
library
Functions
-
alt<C, L, R>(ReaderTaskEither<C, L, R> orElse(L left))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
If the given ReaderTaskEither is an Left, then unwrap the result and transform
it into an alternative ReaderTaskEither.
-
as<C, L, R1, R2>(R2 r2)
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1> task)
-
-
ask<R, E>()
→ ReaderTaskEither<R, E, R>
-
Projects a value from the global context in a ReaderTaskEither.
-
asks<R, E, A>(A f(R r))
→ ReaderTaskEither<R, E, A>
-
Projects a value from the global context in a ReaderTaskEither.
-
asUnit<C, L, R>(ReaderTaskEither<C, L, R> task)
→ ReaderTaskEither<C, L, Unit>
-
-
chainNullableK<C, L, R, R2>(R2? f(R right), L onNone(R right))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R> taskEither)
-
Chainable variant of fromNullableK.
-
chainTryCatchK<C, L, R, R2>(FutureOr<R2> task(R value), L onError(dynamic err, StackTrace stackTrace))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R>)
-
A chainable variant of tryCatchK.
-
delay<C, L, R>(Duration d)
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
Pause execution of the task by the given Duration.
-
Do<C, L, R>(DoFunction<C, L, R> f)
→ ReaderTaskEither<C, L, R>
-
-
filter<C, L, R>(bool predicate(R value), L orElse(R value))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R> taskEither)
-
Conditionally filter the ReaderTaskEither, transforming Right values to Left.
-
flatMap<C, L, R1, R2>(ReaderTaskEither<C, L, R2> f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
Composes computations in sequence, using the return value from the previous
computation.
-
flatMapEither<C, L, R1, R2>(Either<L, R2> f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
-
flatMapFirst<C, L, R>(ReaderTaskEither<C, L, dynamic> f(R a))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
Composes computations in sequence, using the return value from the previous
computation. Discarding the result.
-
flatMapFirstEither<C, L, R>(Either<L, dynamic> f(R a))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
-
flatMapFirstTask<C, L, R>(Task f(R a))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
-
flatMapFirstTaskEither<C, L, R>(TaskEither<L, dynamic> f(R a))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
-
flatMapOption<C, L, A, B>(Option<B> f(A a), L onNone(A a))
→ ReaderTaskEither<C, L, B> Function(ReaderTaskEither<C, L, A>)
-
-
flatMapReader<C, L, R1, R2>(Reader<C, R2> f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
-
flatMapReaderTask<C, L, R1, R2>(ReaderTask<C, R2> f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
-
flatMapTask<C, L, R1, R2>(Task<R2> f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
-
flatMapTaskEither<C, L, R1, R2>(TaskEither<L, R2> f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
-
flatMapTuple2<C, L, R, R2>(ReaderTaskEither<C, L, R2> f(R value))
→ ReaderTaskEither<C, L, dynamic> Function(ReaderTaskEither<C, L, R> fa)
-
A variant of flatMap that appends the result to a tuple.
-
flatMapTuple3<C, L, R, R2, R3>(ReaderTaskEither<C, L, R3> f(dynamic a))
→ ReaderTaskEither<C, L, Tuple3<R, R2, R3>> Function(ReaderTaskEither<C, L, dynamic> fa)
-
A variant of flatMap that appends the result to a tuple.
-
fold<R, L, A, B>(B onLeft(L left), B onRight(A right))
→ ReaderTask<R, B> Function(ReaderTaskEither<R, L, A>)
-
Unwraps the Either value, returning a ReaderTask that resolves to the
result.
-
fromEither<C, L, R>(Either<L, R> either)
→ ReaderTaskEither<C, L, R>
-
Returns a ReaderTaskEither that resolves to the given Either.
-
fromNullable<C, L, R>(R? value, L onNone())
→ ReaderTaskEither<C, L, R>
-
Create a TaskEither from a nullable value.
onNone
is executed if the
given value is null
.
-
fromNullableK<C, L, R, A>(R? f(A value), L onNone(A value))
→ ReaderTaskEither<C, L, R> Function(A value)
-
Create a TaskEither from a nullable value.
onNone
is executed if the
value (given to the returned function) is null
.
-
fromOption<C, L, R>(L onNone())
→ ReaderTaskEither<C, L, R> Function(Option<R> option)
-
Create a ReaderTaskEither from an Option. If it is None, then the
ReaderTaskEither will resolve to a Left containing the result from executing
onNone
.
-
fromPredicate<C, L, R>(R r, bool f(R r), L orElse(R r))
→ ReaderTaskEither<C, L, R>
-
If the function returns true, then the resolved Either will be a Right
containing the given
value
.
-
fromPredicateK<C, L, R>(bool f(R r), L orElse(R r))
→ ReaderTaskEither<C, L, R> Function(R r)
-
If the function returns true, then the resolved Either will be a Right
containing the given
value
.
-
fromReader<C, L, R>(Reader<C, R> f)
→ ReaderTaskEither<C, L, R>
-
Transforms a Reader into a ReaderTaskEither, wrapping the result in an Right.
-
fromReaderTask<C, L, R>(ReaderTask<C, R> f)
→ ReaderTaskEither<C, L, R>
-
Transforms a ReaderTask into a ReaderTaskEither, wrapping the result in an Right.
-
fromTask<C, L, R>(Task<R> task)
→ ReaderTaskEither<C, L, R>
-
Transforms a Task into a ReaderTaskEither, wrapping the result in an Right.
-
fromTaskEither<C, L, R>(TaskEither<L, R> taskEither)
→ ReaderTaskEither<C, L, R>
-
Returns a ReaderTaskEither that resolves to the given TaskEither.
-
getOrElse<C, L, R>(R onLeft(L left))
→ ReaderTask<C, R> Function(ReaderTaskEither<C, L, R> taskEither)
-
Unwrap the Either value. Resolves to the unwrapped Right value, but
if the ReaderTaskEither is an Left, the
onLeft
callback determines the
fallback value.
-
left<R, E, A>(E e)
→ ReaderTaskEither<R, E, A>
-
Projects a TE.left value in a ReaderTaskEither.
-
makeDo<C, L>()
→ ReaderTaskEither<C, L, R> Function<R>(DoFunction<C, L, R> )
-
Create a Do notation factory for the given generics
-
map<C, L, R1, R2>(R2 f(R1 a))
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1>)
-
Composes computations in sequence, using the return value from the previous
computation.
-
mapLeft<C, L1, L2, R>(L2 f(L1 a))
→ ReaderTaskEither<C, L2, R> Function(ReaderTaskEither<C, L1, R>)
-
Composes computations in sequence, using the return value from the previous
computation.
-
orElse<C, L, R>(ReaderTaskEither<C, L, R> orElse)
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
Similar to alt, but the alternative ReaderTaskEither is given directly.
-
pure<C, L, R, R2>(R2 a)
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R>)
-
Replace the ReaderTaskEither with one that resolves to an Right containing
the given value.
-
right<R, E, A>(A a)
→ ReaderTaskEither<R, E, A>
-
Projects a TE.right value in a ReaderTaskEither.
-
sequence<C, L, R>(Iterable<ReaderTaskEither<C, L, R>> arr)
→ ReaderTaskEither<C, L, IList<R>>
-
-
sequenceSeq<C, L, R>(Iterable<ReaderTaskEither<C, L, R>> arr)
→ ReaderTaskEither<C, L, IList<R>>
-
-
tap<C, L, R>(FutureOr<void> f(R value))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
Run a side effect on a Right value. The side effect can optionally return
a Future.
-
tapLeft<C, L, R>(FutureOr<void> f(L value))
→ ReaderTaskEither<C, L, R> Function(ReaderTaskEither<C, L, R>)
-
Run a side effect on a Left value. The side effect can optionally return
a Future.
-
toFuture<R, E, A>(ReaderTaskEither<R, E, A> f)
→ Future<A> Function(R r)
-
-
toFutureVoid<C, L>(void onLeft(L value))
→ Future<void> Function(C) Function(ReaderTaskEither<C, L, dynamic>)
-
Convert a ReaderTaskEither into a Future<void>, that runs the side effect on
Left.
-
traverseIterable<A, C, L, R>(ReaderTaskEither<C, L, R> f(A a))
→ ReaderTaskEither<C, L, IList<R>> Function(Iterable<A>)
-
-
traverseIterableSeq<A, C, L, R>(ReaderTaskEither<C, L, R> f(A a))
→ ReaderTaskEither<C, L, IList<R>> Function(Iterable<A>)
-
-
tryCatch<C, L, R>(FutureOr<R> task(), L onError(dynamic err, StackTrace stackTrace))
→ ReaderTaskEither<C, L, R>
-
Runs the given task, and returns the result as an Right.
If it throws an error, the the error is passed to
onError
, which determines
the Left value.
-
tryCatchK<C, A, L, R>(FutureOr<R> task(A value), L onError(dynamic err, StackTrace stackTrace))
→ ReaderTaskEither<C, L, R> Function(A value)
-
A variant of tryCatch that accepts an external parameter.
-
tryCatchK2<A, B, C, L, R>(FutureOr<R> task(A a, B b), L onError(dynamic err, StackTrace stackTrace))
→ ReaderTaskEither<C, L, R> Function(A a, B b)
-
A variant of tryCatch that accepts two external parameters.
-
unit<R, E>()
→ ReaderTaskEither<R, E, Unit>
-
-
zipRight<C, L, R1, R2>(ReaderTaskEither<C, L, R2> chain)
→ ReaderTaskEither<C, L, R2> Function(ReaderTaskEither<C, L, R1> task)
-
Typedefs
-
DoFunction<C, L, R>
= Future<R> Function(_DoAdapter<C, L> $, C context)
-