Skip to content

Type Interfaces : Zippable

johnmcclean-aol edited this page Nov 22, 2016 · 1 revision

The Zippable interface

A Zippable represents a type that is combinable with an Iterable or reactive-streams Publisher using a user supplied function.

In cyclops-react it various overload versions of this method

  • zip : lazily (assuming type is lazy) combines the current Zippable with another Iterable or Publisher using the user supplied function

Examples

FutureW.ofSupplier(this::loadData,exec)
       .zip(Maybe.just(10),(a,b)->a+b))//asynchronously apply the adding function when loadData completes


ListX.of(1,2,3)
     .zip(ReactiveSeq.of('a','b','c'),(a,b)->""+a+":"+b);    //["1:a","2:b","3:c"]
//executes eagerly as ListX is eager (see LazyListX in cyclops-reactor for Lazy Implementations     
     

Implementations

CollectionXImpl, CompletableFutureTSeq, CompletableFutureTValue, DequeXImpl, Eval.Module.Always, Eval.Module.Later, EvalTSeq, EvalTValue, FeatureToggle.Disabled, FeatureToggle.Enabled, FutureW, FutureWTSeq, FutureWTValue, Ior.Both, Ior.Primary, Ior.Secondary, LazyImmutable, ListTSeq, ListTValue, ListXImpl, Maybe.Just, Maybe.Lazy, Maybe.Nothing, MaybeTSeq, MaybeTValue, Mutable, MutableBoolean, MutableByte, MutableChar, MutableDouble, MutableFloat, MutableInt, MutableLong, MutableShort, OptionalTSeq, OptionalTValue, PBagXImpl, POrderedSetXImpl, PQueueXImpl, PSetXImpl, PStackXImpl, PVectorXImpl, QueueXImpl, SetTSeq, SetTValue, SetXImpl, SortedSetXImpl, StreamableTSeq, StreamableTValue, StreamTSeq, StreamTValue, Try.Failure, Try.Success, TryTSeq, TryTValue, Value.ValueImpl, ValueSubscriber, Xor.Primary, Xor.Secondary, XorTSeq, XorTValue

Clone this wiki locally