# zip

abstract fun <A, B, R> zip(first: Provider<A>, second: Provider<B>, combiner: BiFunction<in A, in B, out R>): Provider<R>(source)

Returns a provider which value will be computed by combining a provider value with another provider value using the supplied combiner function.

The resulting provider will be live, so that each time it is queried, it queries both supplied providers and applies the combiner to the results. Whenever any of the providers has no value, the new provider will also have no value and the combiner will not be called.

If the supplied providers represents a task or the output of a task, the resulting provider will carry the dependency information.

#### Return

a combined provider

#### Since

6.6

#### Parameters

first

the first provider to combine with

second

the second provider to combine with

combiner

the combiner of values. May return `null`, in which case the provider will have no value.

<A>

the type of the first provider

<B>

the type of the second provider

<R>

the type of the result of the combiner