akka-stream-contrib
akka-stream-contrib copied to clipboard
Do we need Accumulate
According to the docs (I wrote): "This stage emits folded values like scan
, but the first element emitted is not the zero value but the result of applying the given function to the given zero value and the first pushed element."
The same can be achieved with scan(...)(...).drop(1)
.
What do others think?
@patriknw, @ktoso, (other Akka team members),
I suggest we get rid of this beautiful piece of code again, because it's simpler to use the two well known standard stages scan
and drop
in combination instead of introducing another one which is very similar to scan
.
If you agree, I'd create a PR which deprecates Accumulate
.
@patriknw, @ktoso, @drewhk, any opinions?
The custom stage is more efficient, however it does not show good example to users (build from existing ops), so maybe better removing it.
I agree with deprecation and mention scan+drop as a replacement.