-
Notifications
You must be signed in to change notification settings - Fork 136
Type Interfaces : Combiner
johnmcclean-aol edited this page Nov 23, 2016
·
1 revision
A Combiner can be used to combine values inside wrapped types by applying a function. It is a lighter weight super-class of ApplicativeFunctor.
In cyclops-react it has the following methods
- combine : lazily combines the current ApplicativeFunctor with another Value or Combiner/ ApplicativeFunctor type via a user supplied function
FutureW.ofSupplier(this::loadData,exec)
.combine(Maybe.just(10),(a,b)->a+b))//asynchronously apply the adding function when loadData completes
AnyMValue, ApplicativeFunctor, Eval, FeatureToggle, Ior<ST,PT>, Maybe, TransformerValue, Try<T,X>, Xor<ST,PT>
oops - my bad