Skip to content

Commit 0e0272a

Browse files
authored
Update 09_CombiningSequences.md (#2087)
The description of a marble diagram was inconsistent with the diagram. (It had the labels `s1` and `s2` backwards.)
1 parent 2305a5b commit 0e0272a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rx.NET/Documentation/IntroToRx/09_CombiningSequences.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ The marble diagram below shows off usage of `CombineLatest` with one sequence th
653653

654654
![A marble diagram showing three sequences. The first, s1, waits for a while then produces the values 1, 2, and 3, spaced out over time. The second, s2, starts at the same time as s1, and waits for less time, producing its first value, a, before s1 produces 1. Then after s1 has produced 2, s2 produces b and then c, both being produced before s1 produces 3. The third sequence, CombineLatest, shows '1,a' at the same time as s1 produces 1, then '2,a' when s1 produces 2, then '2,b' when s2 produces b, then '2,c' when s2 produces c, then '3,c' when s1 produces 3. All three sequences do not end within the time shown in the diagram.](GraphicsIntro/Ch09-CombiningSequences-Marbles-CombineLatest-Marbles.svg)
655655

656-
If we slowly walk through the above marble diagram, we first see that `s1` produces the letter 'a'. `s2` has not produced any value yet so there is nothing to pair, meaning that no value is produced for the result. Next, `s2` produces the number '1' so the result sequence can now produce a pair '1,a'. We then receive the number '2' from `s1`. The last letter is still 'a' so the next pair is '2,a'. The letter 'b' is then produced creating the pair '2,b', followed by 'c' giving '2,c'. Finally the number 3 is produced and we get the pair '3,c'.
656+
If we slowly walk through the above marble diagram, we first see that `s2` produces the letter 'a'. `s1` has not produced any value yet so there is nothing to pair, meaning that no value is produced for the result. Next, `s1` produces the number '1' so the result sequence can now produce a pair '1,a'. We then receive the number '2' from `s1`. The last letter is still 'a' so the next pair is '2,a'. The letter 'b' is then produced creating the pair '2,b', followed by 'c' giving '2,c'. Finally the number 3 is produced and we get the pair '3,c'.
657657

658658
This is great in case you need to evaluate some combination of state which needs to be kept up-to-date when any single component of that state changes. A simple example would be a monitoring system. Each service is represented by a sequence that returns a Boolean indicating the availability of said service. The monitoring status is green if all services are available; we can achieve this by having the result selector perform a logical AND.
659659
Here is an example.
@@ -882,4 +882,4 @@ The `And`/`Then`/`When` trio has more overloads that enable you to group an even
882882

883883
## Summary
884884

885-
This chapter covered a set of methods that allow us to combine observable sequences. This brings us to a close on Part 2. We've looked at the operators that are mostly concerned with defining the computations we want to perform on the data. In Part 3 we will move onto practical concerns such as managing scheduling, side effects, and error handling.
885+
This chapter covered a set of methods that allow us to combine observable sequences. This brings us to a close on Part 2. We've looked at the operators that are mostly concerned with defining the computations we want to perform on the data. In Part 3 we will move onto practical concerns such as managing scheduling, side effects, and error handling.

0 commit comments

Comments
 (0)