Skip to content

Commit 6f7d0b9

Browse files
ianrahmankzaher
authored andcommitted
Minor grammatical edits
1 parent 7a9c773 commit 6f7d0b9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Documentation/GettingStarted.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ People are creatures with huge visual cortexes. When we can visualize a concept
4242

4343
We can lift a lot of the cognitive load from trying to simulate event state machines inside every Rx operator onto high level operations over sequences.
4444

45-
If we don't use Rx but model asynchronous systems, that probably means that our code is full of state machines and transient states that we need to simulate instead of abstracting away.
45+
If we don't use Rx but model asynchronous systems, that probably means our code is full of state machines and transient states that we need to simulate instead of abstracting away.
4646

4747
Lists and sequences are probably one of the first concepts mathematicians and programmers learn.
4848

@@ -59,7 +59,7 @@ Another sequence, with characters:
5959
--a--b--a--a--a---d---X // terminates with error
6060
```
6161

62-
Some sequences are finite and others are infinite, like a sequence of button taps:
62+
Some sequences are finite while others are infinite, like a sequence of button taps:
6363

6464
```
6565
---tap-tap-------tap--->
@@ -100,11 +100,11 @@ protocol ObserverType {
100100

101101
If a sequence terminates in finite time, not calling `dispose` or not using `disposed(by: disposeBag)` won't cause any permanent resource leaks. However, those resources will be used until the sequence completes, either by finishing production of elements or returning an error.
102102

103-
If a sequence does not terminate in some way, resources will be allocated permanently unless `dispose` is called manually, automatically inside of a `disposeBag`, `takeUntil` or in some other way.
103+
If a sequence does not terminate on its own, such as with a series of button taps, resources will be allocated permanently unless `dispose` is called manually, automatically inside of a `disposeBag`, with the `takeUntil` operator, or in some other way.
104104

105105
**Using dispose bags or `takeUntil` operator is a robust way of making sure resources are cleaned up. We recommend using them in production even if the sequences will terminate in finite time.**
106106

107-
In case you are curious why `Swift.Error` isn't generic, you can find explanation [here](DesignRationale.md#why-error-type-isnt-generic).
107+
If you are curious why `Swift.Error` isn't generic, you can find the explanation [here](DesignRationale.md#why-error-type-isnt-generic).
108108

109109
## Disposing
110110

@@ -135,11 +135,11 @@ This will print:
135135
5
136136
```
137137

138-
Note that you usually do not want to manually call `dispose`; this is only educational example. Calling dispose manually is usually a bad code smell. There are better ways to dispose subscriptions. We can use `DisposeBag`, the `takeUntil` operator, or some other mechanism.
138+
Note that you usually do not want to manually call `dispose`; this is only an educational example. Calling dispose manually is usually a bad code smell. There are better ways to dispose of subscriptions such as `DisposeBag`, the `takeUntil` operator, or some other mechanism.
139139

140-
So can this code print something after the `dispose` call executed? The answer is: it depends.
140+
So can this code print something after the `dispose` call is executed? The answer is: it depends.
141141

142-
* If the `scheduler` is a **serial scheduler** (ex. `MainScheduler`) and `dispose` is called on **on the same serial scheduler**, the answer is **no**.
142+
* If the `scheduler` is a **serial scheduler** (ex. `MainScheduler`) and `dispose` is called **on the same serial scheduler**, the answer is **no**.
143143

144144
* Otherwise it is **yes**.
145145

@@ -148,7 +148,7 @@ You can find out more about schedulers [here](Schedulers.md).
148148
You simply have two processes happening in parallel.
149149

150150
* one is producing elements
151-
* the other is disposing the subscription
151+
* the other is disposing of the subscription
152152

153153
The question "Can something be printed after?" does not even make sense in the case that those processes are on different schedulers.
154154

0 commit comments

Comments
 (0)