Sometimes it is really needed to have a stateful map (or any other) operation, in this case, it can't be partitioned (automatically), and needed to be marked as SinglePartitionBean. Right now you may use flatMap() returning singleton list, but that way is hacky and non-consistent.
Proposed signature:
stream.map { }.singular()
Sometimes it is really needed to have a stateful map (or any other) operation, in this case, it can't be partitioned (automatically), and needed to be marked as
SinglePartitionBean. Right now you may useflatMap()returning singleton list, but that way is hacky and non-consistent.Proposed signature:
stream.map { }.singular()