Zipped Observable
Rocket.zipped
— Functionzipped(sources...)
Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each of its input Observables.
Arguments
sources
: input sources
Examples
using Rocket
source = zipped(of(1), from(2:5))
subscribe!(source, logger())
;
# output
[LogActor] Data: (1, 2)
[LogActor] Completed
using Rocket
source = zipped(from(1:3), from(1:5))
subscribe!(source, logger())
;
# output
[LogActor] Data: (1, 1)
[LogActor] Data: (2, 2)
[LogActor] Data: (3, 3)
[LogActor] Completed
using Rocket
source = zipped(completed(), of(0.0))
subscribe!(source, logger())
;
# output
[LogActor] Completed
See also: Subscribable
, subscribe!