pjfanning commented on code in PR #1868: URL: https://github.com/apache/pekko/pull/1868#discussion_r2111794236
########## docs/src/main/paradox/stream/operators/Source-or-Flow/dropRepeated.md: ########## @@ -0,0 +1,41 @@ +# dropRepeated + +Only pass on those elements that are distinct from the previous element. + +@ref[Simple operators](../index.md#simple-operators) + +## Signature + +@apidoc[Source.dropRepeated](Source) { scala="#dropRepeated):FlowOps.this.Repr[Out]" java="#dropRepeated()" } +@apidoc[Flow.dropRepeated](Flow) { scala="#dropRepeated():FlowOps.this.Repr[Out]" java="#dropRepeated()" } + + +## Description + +Only pass on those elements that are distinct from the previous element. + +## Example + +For example, given a `Source` of numbers, we just want to pass distinct numbers downstream: + +Scala +: @@snip [Filter.scala](/docs/src/test/scala/docs/stream/operators/sourceorflow/Filter.scala) { #dropRepeated } + +Java +: @@snip [SourceOrFlow.java](/docs/src/test/java/jdocs/stream/operators/SourceOrFlow.java) { #dropRepeated } + +## Reactive Streams semantics + +@@@div { .callout } + +**emits** when the element is distinct from the previous element + +**backpressures** when the element is distinct from the previous element and downstream backpressures + +**completes** when upstream completes + +@@@ + +## API docs + +@apidoc[Flow.filter](Flow) { scala="#distinctUntilChanged():FlowOps.this.Repr[Out]" java="#distinctUntilChanged()" } Review Comment: this line seems wrong it would make sense to mention in the description section that specific reactive frameworks call their equivalent of this operator 'distinctUntilChanged' -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org