apache / apache/pekko

Feature request: Add `Flow#switchOnFirst` operator for shortcut of `prefixAndtail(1).flatmapConcat(..)` ?

Open
#988 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.6k
Forks
211
Avg merge
1d 6h
Merged PRs (30d)
89

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.