Skip to content

Commit

Permalink
fix numbering in statefulMap.md (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Feb 17, 2024
1 parent 7bdd230 commit 3613bd9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For mapping stream elements without keeping a state see @ref:[map](map.md).

## Examples

In the first example we implement an `zipWithIndex` operator like @ref:[zipWithIndex](zipWithIndex.md), it always associates a unique index
In the first example, we implement an `zipWithIndex` operator like @ref:[zipWithIndex](zipWithIndex.md), it always associates a unique index
with each element of the stream, the index starts from 0.

Scala
Expand All @@ -45,15 +45,15 @@ Scala
Java
: @@snip [StatefulMap.java](/docs/src/test/java/jdocs/stream/operators/flow/StatefulMap.java) { #bufferUntilChanged }

In the forth example, repeated incoming elements are only emitted once and then dropped.
In the third example, repeated incoming elements are only emitted once and then dropped.

Scala
: @@snip [StatefulMap.scala](/docs/src/test/scala/docs/stream/operators/flow/StatefulMap.scala) { #distinctUntilChanged }

Java
: @@snip [StatefulMap.java](/docs/src/test/java/jdocs/stream/operators/flow/StatefulMap.java) { #distinctUntilChanged }

In the fifth example, we combine the @ref:[statefulMap](statefulMap.md) and @ref:[mapConcat](mapConcat.md) to implement
In the fourth example, we combine the @ref:[statefulMap](statefulMap.md) and @ref:[mapConcat](mapConcat.md) to implement
a @ref:[statefulMapConcat](statefulMapConcat.md) like behavior.

Scala
Expand Down

0 comments on commit 3613bd9

Please sign in to comment.