leonoel / missionary

A functional effect and streaming system for Clojure/Script
Eclipse Public License 2.0
630 stars 26 forks source link

Add a gathering operator for `ap` #10

Closed leonoel closed 4 years ago

leonoel commented 4 years ago

gather is able to merge an arbitrary amount of flows into a single one, but there's currently no way to have gather semantics for a flow of flows.

We could have a gathering operator that would behave like ?? or ?! except when the flow emits its next value before the previous continuation terminates, a new continuation is run concurrently and the resulting ap flow emits values as soon as they're ready.

Just like ?? and ?! respectively match RxJava's concatMap and switchMap, this new operator would match flatMap.

leonoel commented 4 years ago

Released in version b.12