X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Part 2 - Sequence Basics/1. Creating a sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ The example above waits 2 seconds, then starts counting every 1 second.

## Transitioning into Observable

There are well established tools for dealing with sequences, collections and asychronous events, which may not be directly compatible with Rx. Here we will discuss ways to turn their output into input for your Rx code.
There are well established tools for dealing with sequences, collections and asynchronous events, which may not be directly compatible with Rx. Here we will discuss ways to turn their output into input for your Rx code.

If you are using an asynchronous tool that uses event handlers, like JavaFX, you can use `Observable.create` to turn the streams into an observable

Expand All @@ -246,7 +246,7 @@ Depending on what the event is, the event type (here `ActionEvent`) may be meani

Much like most of the functions we've seen so far, you can turn any kind of input into an Rx observable with `create`. There are several shorthands for converting common types of input.

`Future`s are part of the Java framework and you may come across them while using frameworks that use concurrency. They are a less powerful concept for concurrency than Rx, since they only return one value. Naturally, you'd like to them into observables.
`Future`s are part of the Java framework and you may come across them while using frameworks that use concurrency. They are a less powerful concept for concurrency than Rx, since they only return one value. Naturally, you'd like them to return into observables.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to return into observables" doesn't make much sense either.
"you'd 'like to turn them into observables" is probably what I meant to write.


```java
FutureTask<Integer> f = new FutureTask<Integer>(() -> {
Expand Down
2 changes: 1 addition & 1 deletion Part 2 - Sequence Basics/2. Reducing a sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Most of the operators here will be familiar to anyone who has worked with Java's

### Marble diagrams

This is an appropriate time to introduce to concept of marble diagrams. It is a popular way of explaining the operators in Rx, because of their intuitive and graphical nature. They are present a lot in the documentation of RxJava and it only makes sense that we take advantage of their explanatory nature. The format is mostly self-explanatory: time flows left to right, shapes represent values, a slash is an onCompletion, an X is an error. The operator is applied to the top sequence and the result is the sequence below.
This is an appropriate time to introduce the concept of marble diagrams. It is a popular way of explaining the operators in Rx, because of their intuitive and graphical nature. They are present a lot in the documentation of RxJava and it only makes sense that we take advantage of their explanatory nature. The format is mostly self-explanatory: time flows left to right, shapes represent values, a slash is an onCompletion, an X is an error. The operator is applied to the top sequence and the result is the sequence below.

![](https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/legend.png)

Expand Down
X Tutup