Skip to content

Commit be8b015

Browse files
committed
make it better
1 parent b4e4b11 commit be8b015

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tutorials/coroutines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Here, once again the `$try` macro sets up a coroutine lambda that gets immediate
119119
120120
When you need to perform operations on a series of values, it's sometimes preferred to lazily evaluate them instead of collecting everything into a vector. The `coro::Generator` object allows you to create coroutines that lazily yield values, just like Python generators.
121121
122-
Here's what a basic fibbonacci generator looks like:
122+
Here's what a basic range generator looks like:
123123
124124
```cpp
125125
#include <Geode/utils/coro.hpp>
@@ -169,7 +169,7 @@ for (int num : fibbonacci()) {
169169

170170
The caller of the generator is the one that determines when the sequence ends, not the callee, giving you lots of flexibility.
171171

172-
Generators have two helper functions that quickly allow you to apply transformations: map and filter. These transformation functions yield more generators, allowing you to chain them as you please. You can use them on any generator to transform their output like so:
172+
Generators have two helper functions that quickly allow you to apply transformations: `map` and `filter`. These transformation functions yield more generators, allowing you to chain them as you please. You can use them on any generator to transform their output like so:
173173

174174
```cpp
175175
// Prints 0, -1, -2, ...
@@ -183,4 +183,4 @@ for (int num : range(0, 10).filter([](int n) { return n % 2 == 0; })) {
183183
}
184184
```
185185

186-
You can use the `coro::makeGenerator` function to construct a generator based on a vector
186+
You can use the `coro::makeGenerator` function to construct a generator based on a vector.

0 commit comments

Comments
 (0)