Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 853 Bytes

zipfromiterable.md

File metadata and controls

38 lines (25 loc) · 853 Bytes

ZipFromIterable Operator

Overview

Merge the emissions of an Iterable via a specified function and emit single items for each combination based on the results of this function.

Example

observable1 := rxgo.Just(1, 2, 3)()
observable2 := rxgo.Just(10, 20, 30)()
zipper := func(_ context.Context, i1 interface{}, i2 interface{}) (interface{}, error) {
	return i1.(int) + i2.(int), nil
}
zippedObservable := observable1.ZipFromIterable(observable2, zipper)

Output:

11
22
33

Options