identity library

Classes

Identity<A>
Represents a container that wraps a single value.
MergedMap<K, V1, V2>

Properties

reduce → B Function(Identity<A>) Function<A, B>(B initial, B f(B, A))
An alias to fold function.
final

Functions

ap<A, B>(Identity<B Function(A)> f) Identity<B> Function(Identity<A>)
Applies the function wrapped in an Identity to the value inside another Identity.
extract<A>(Identity<A> identity) → A
Extracts the value contained within the identity.
flatMap<A, B>(Identity<B> f(A)) Identity<B> Function(Identity<A>)
Flat maps (or binds) the value inside an Identity using a given function.
fold<A, B>(B initial, B f(B, A)) → B Function(Identity<A>)
Folds the value within an Identity monad.
foldMap<A, M>(BaseMonoid<M> monoid, M f(A)) → M Function(Identity<A>)
Maps over the value within an Identity monad and then folds the result using a given monoid.
letFn<A, B>(String name, B f(Map<String, A> fa), Map<String, A> fa) MergedMap<String, A, B>
map<A, B>(B f(A)) Identity<B> Function(Identity<A>)
Transforms the value inside an Identity using a given function.
of<B>(B value) Identity<B>
Wraps the provided value into an Identity.