images to svg

This commit is contained in:
Ilya Kantor 2019-07-28 15:42:37 +03:00
parent a31e881856
commit 3ba28aa104
734 changed files with 11682 additions and 245 deletions

View file

@ -29,7 +29,7 @@ let generator = generateSequence();
The `generator` object is something like an "frozen function call":
![](generateSequence-1.png)
![](generateSequence-1.svg)
Upon creation, the code execution is paused at the very beginning.
@ -59,7 +59,7 @@ The result of `next()` is always an object:
As of now, we got the first value only:
![](generateSequence-2.png)
![](generateSequence-2.svg)
Let's call `generator.next()` again. It resumes the code execution and returns the next `yield`:
@ -69,7 +69,7 @@ let two = generator.next();
alert(JSON.stringify(two)); // {value: 2, done: false}
```
![](generateSequence-3.png)
![](generateSequence-3.svg)
And, if we call it the third time, then the execution reaches `return` statement that finishes the function:
@ -79,7 +79,7 @@ let three = generator.next();
alert(JSON.stringify(three)); // {value: 3, *!*done: true*/!*}
```
![](generateSequence-4.png)
![](generateSequence-4.svg)
Now the generator is done. We should see it from `done:true` and process `value:3` as the final result.
@ -349,7 +349,7 @@ let question = generator.next().value; // <-- yield returns the value
generator.next(4); // --> pass the result into the generator
```
![](genYield2.png)
![](genYield2.svg)
1. The first call `generator.next()` is always without an argument. It starts the execution and returns the result of the first `yield` ("2+2?"). At this point the generator pauses the execution (still on that line).
2. Then, as shown at the picture above, the result of `yield` gets into the `question` variable in the calling code.
@ -390,7 +390,7 @@ alert( generator.next(9).done ); // true
The execution picture:
![](genYield2-2.png)
![](genYield2-2.svg)
1. The first `.next()` starts the execution... It reaches the first `yield`.
2. The result is returned to the outer code.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB