combineWith
Combine two states together into a single Signal by applying a function to the two input states.
Example:
val countA: State<Int> = ...
val countB: State<Int> = ...
val sum = countA.combineWith(countB) { x, y -> x + y }
Content copied to clipboard
fun <B, C, D> combineWith(state2: Signal<B>, state3: Signal<C>, op: (A, B, C) -> D): Signal<D>(source)