pekko
pekko copied to clipboard
Feature request: Add `Flow#switchOnFirst` operator for shortcut of `prefixAndtail(1).flatmapConcat(..)` ?
Motivation:
I find it's very common to write code as prefixAndTail(1).flatMapConcat(...), this kind is just something like Flux#switchOnFirst.
And more fine control can be done with the prefixAndTail but I think for most case is prefixAndTail(1).flatMapConcat(...) like thing.
Result: Simpler code for common use case.
The prefixAndTail(1).flatMapConcat(...) is indeed incredibly common, but not so convinced with the switchOnFirst name. How about popAndFlatMapConcat? I think this terminology is closer to Akka/Pekko
Open to other suggestions as well