Is there an equivalent to RX's `amb` operator in F...
# flow
e
Is there an equivalent to RX's
amb
operator in Flow? I've been using a coroutines utility function in my project, but I wanted to know if there's a more "Flow" way to do it:
Copy code
suspend inline fun awaitFirst(vararg funcs: suspend () -> Unit) {
  supervisorScope {
    select<Unit> {
      funcs.forEach { func -> launch { func() }.onJoin {} }
    }

    coroutineContext.cancelChildren()
  }
}

awaitFirst(
  events.observeNextButtonClicks()::first,
  events.observeDelegatedNextClicks()::first
)