From 13d424066252fdf1e9a12964dde90a6201431763 Mon Sep 17 00:00:00 2001 From: Will Plusnick Date: Sun, 21 Jul 2024 21:38:42 -0500 Subject: [PATCH] Fix typos in code examples of chapter 4 * Add a close quote to an array example * Add `show` to an associationsDo dictionary cascade --- docs/Collections-detailed.html | 4 ++-- en/chapter-04/contents.texinfo | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Collections-detailed.html b/docs/Collections-detailed.html index fe14fe57..c963e9d0 100644 --- a/docs/Collections-detailed.html +++ b/docs/Collections-detailed.html @@ -170,7 +170,7 @@

4.4 Collections detailed

Example 4.10: Collection access to elements

Use the System Browser to discover alternative ways to access elements @@ -362,7 +362,7 @@

4.4 Collections detailed
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. diff --git a/en/chapter-04/contents.texinfo b/en/chapter-04/contents.texinfo index 3c7988d0..83804d0b 100644 --- a/en/chapter-04/contents.texinfo +++ b/en/chapter-04/contents.texinfo @@ -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. @@ -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.