Skip to content

Commit

Permalink
Merge pull request #39 from pwplusnick/patch-1
Browse files Browse the repository at this point in the history
Fix typos in code examples of chapter 4
  • Loading branch information
hilaire authored Jul 22, 2024
2 parents ff43123 + 13d4240 commit 9c5dba8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/Collections-detailed.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ <h3 class="section" id="Collections-detailed-1"><span>4.4 Collections detailed<a
array2 at: 3 &rArr; 2@3
array2 swap: 2 with: 4 &rArr; #(2 1/3 2@3 'Apple')
array1 at: 2 put: 'Orange'; yourself &rArr; #(2 'Orange' $@ 4)
array1 indexOf: 'Orange &rArr; 2
array1 indexOf: 'Orange' &rArr; 2
</pre></div>
<div class="caption"><p><strong class="strong">Example 4.10: </strong>Collection access to elements</p></div></div>
<p>Use the System Browser to discover alternative ways to access elements
Expand Down Expand Up @@ -362,7 +362,7 @@ <h3 class="section" id="Collections-detailed-1"><span>4.4 Collections detailed<a
</p>
<div class="example smallexample">
<pre class="example-preformatted">colors associationsDo: [:assoc |
Transcript show: assoc key; space; assoc value; cr ]
Transcript show: assoc key; space; show: assoc value; cr ]
</pre></div>

<p>There are other variants to explore by yourself.
Expand Down
4 changes: 2 additions & 2 deletions en/chapter-04/contents.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ array1 at: 2 @result{} 'Apple'
array2 at: 3 @result{} 2@@3
array2 swap: 2 with: 4 @result{} #(2 1/3 2@@3 'Apple')
array1 at: 2 put: 'Orange'; yourself @result{} #(2 'Orange' $@@ 4)
array1 indexOf: 'Orange @result{} 2}
array1 indexOf: 'Orange' @result{} 2}

Use the System Browser to discover alternative ways to access elements
of a collection.
Expand Down Expand Up @@ -780,7 +780,7 @@ dictionary:
Sometimes, you really need to iterate the whole key-value association:

@smalltalkExample{colors associationsDo: [:assoc |
Transcript show: assoc key; space; assoc value; cr ]}
Transcript show: assoc key; space; show: assoc value; cr ]}

There are other variants to explore by yourself.

Expand Down

0 comments on commit 9c5dba8

Please sign in to comment.