#OTHER by mawalch
authormawalch
Mon, 08 Aug 2016 11:51:14 +0200
changeset 20212 e9d7cf16d560
parent 20211 c02d61712505
child 20213 8e1886ca9293
#OTHER by mawalch class: Collection typo
Collection.st
--- a/Collection.st	Mon Aug 08 11:45:28 2016 +0200
+++ b/Collection.st	Mon Aug 08 11:51:14 2016 +0200
@@ -3547,8 +3547,8 @@
     ^ newCollection
 
     "
-     #(1 2 3 4) select:[:e | e odd]   
-     (1 to:10) select:[:e | e even]     
+     #(1 2 3 4) select:[:e | e odd]
+     (1 to:10) select:[:e | e even]
     "
 
     "Modified: / 07-08-2010 / 16:26:40 / cg"
@@ -3651,7 +3651,7 @@
 select:selectBlock thenDo:doBlock
     "combination of select followed by do.
      The same as if two separate select:+do: messages were sent,
-     but avoids the creation of intermediate collections, 
+     but avoids the creation of intermediate collections,
      so this is nicer for big collections."
 
     self do:[:eachElement |
@@ -3666,7 +3666,7 @@
 !
 
 selectWithIndex:aTwoArgBlock
-    "return a new collection with all elements from the receiver, 
+    "return a new collection with all elements from the receiver,
      for which the argument aBlock evaluates to true.
      aTwoArgBlock is called with value and index as arguments."
 
@@ -3679,8 +3679,8 @@
     ^ newCollection
 
     "
-     #(10 20 30 40) selectWithIndex:[:e :i | i odd]   
-     #(10 20 30 40) selectWithIndex:[:e :i | i even]   
+     #(10 20 30 40) selectWithIndex:[:e :i | i odd]
+     #(10 20 30 40) selectWithIndex:[:e :i | i even]
     "
 !
 
@@ -3693,15 +3693,15 @@
         aThreeArgBlock value:(aTriple at:1) value:(aTriple at:2) value:(aTriple at:3).
     ]
     "
-     #( 
-        (1 one eins) 
-        (2 two zwei) 
-        (3 three drei) 
-        (4 four vier) 
-        (5 five #'fuenf') 
+     #(
+        (1 one eins)
+        (2 two zwei)
+        (3 three drei)
+        (4 four vier)
+        (5 five #'fuenf')
         (6 six sechs)
-     ) 
-     triplesDo:[:num :sym1 :sym2 | 
+     )
+     triplesDo:[:num :sym1 :sym2 |
                     Transcript show:num; space; show:sym1; space; showCR:sym2
                ]
     "
@@ -3733,8 +3733,8 @@
     "Modified: 10.5.1997 / 14:15:43 / cg"
 !
 
-with:aCollection andDefault:defaultElement collect:aTwoArgBlock 
-    "like with:colelct:, but use defaultElement for missing elements in aCollection
+with:aCollection andDefault:defaultElement collect:aTwoArgBlock
+    "like with:collect:, but use defaultElement for missing elements in aCollection
      (i.e. if the receiver is longer)
      The third argument, aBlock must be a two-argument block, which is
      evaluated for each element-pair.
@@ -3752,8 +3752,8 @@
     ^ newCollection as:self species
 
     "
-     (1 to:3) with:#(one two) andDefault:'xxx' collect:[:num :sym | (num->sym)] 
-     #(1 2 3) with:#(10 20) andDefault:99 collect:[:x :y | (x@y)]  
+     (1 to:3) with:#(one two) andDefault:'xxx' collect:[:num :sym | (num->sym)]
+     #(1 2 3) with:#(10 20) andDefault:99 collect:[:x :y | (x@y)]
     "
 !
 
@@ -3810,8 +3810,8 @@
     ^ newCollection as:self species
 
     "
-     (1 to:3) with:#(one two three) collect:[:num :sym | (num->sym)] 
-     #(1 2 3) with:#(10 20 30) collect:[:x :y | (x@y)]  
+     (1 to:3) with:#(one two three) collect:[:num :sym | (num->sym)]
+     #(1 2 3) with:#(10 20 30) collect:[:x :y | (x@y)]
     "
 !
 
@@ -3829,8 +3829,8 @@
 
     "
      (1 to:3) with:#(1 2 3 4) conform:[:a :b | a = b]   --- raises an error
-     (1 to:3) with:#(1 22 3) conform:[:a :b | a = b]  
-     (1 to:3) with:#(1 2 3) conform:[:a :b | a = b]  
+     (1 to:3) with:#(1 22 3) conform:[:a :b | a = b]
+     (1 to:3) with:#(1 2 3) conform:[:a :b | a = b]
     "
 !