Reader< R, A> class
final
Reader<R, A>
allows to read values A
from a dependency/context R
without explicitly passing the dependency between multiple nested
function calls.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-onlyoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
andThen<
C>( covariant Reader< R, C> then()) → Reader< R, C> -
Chain the result of
then
to this Reader.override -
ap<
C>( covariant Reader< R, C Function(A a)> a) → Reader< R, C> -
Apply the function contained inside
a
to change the value of typeA
to a value of typeB
.override -
ask(
) → Reader< R, R> -
Read the current dependency
R
. -
asks(
A f(R r)) → Reader< R, A> -
Change reading function to
f
given context/dependencyR
. -
call<
C>( covariant Reader< R, C> chain) → Reader< R, C> -
Chain multiple functions having the reader
R
.override -
chainFirst<
C>( covariant Reader< R, C> chain(A a)) → Reader< R, A> -
Chain a request that returns another Reader, execute it, ignore
the result, and return the same value as the current Reader.
override
-
compose<
C>( Reader< R, C> reader) → Reader< R, C> -
Compose the dependency
R
of this Reader toreader
. -
flatMap<
C>( covariant Reader< R, C> f(A a)) → Reader< R, C> -
Used to chain multiple functions that return a Reader.
override
-
local<
R1>( R f(R1 context)) → Reader< R1, A> -
Change dependency type of
Reader<R, A>
fromR
toR1
after callingrun
. -
map<
C>( C f(A a)) → Reader< R, C> -
Change the value of type
A
to a value of typeC
using functionf
.override -
map2<
C, D>( covariant Reader< R, C> m1, D f(A a, C c)) → Reader< R, D> -
Change type of this Reader based on its value of type
A
and the value of typeC
of another Reader.override -
map3<
C, D, E>( covariant Reader< R, C> m1, covariant Reader< R, D> m2, E f(A a, C c, D d)) → Reader< R, E> -
Change type of this Reader based on its value of type
A
, the value of typeC
of a second Reader, and the value of typeD
of a third Reader.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pure<
C>( C c) → Reader< R, C> -
Return a Reader containing the value
c
.override -
run(
R r) → A -
Provide the value
R
(dependency) and extract resultA
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override