Collection.st
changeset 25081 44d03bc3255a
parent 24885 bebbba1a922f
child 25273 87ad8bae24e5
--- a/Collection.st	Sat Dec 07 14:51:15 2019 +0100
+++ b/Collection.st	Sat Dec 07 15:51:43 2019 +0100
@@ -3694,6 +3694,9 @@
 
     "
      (1 to:10) fold:[:sum :el| sum + el]
+     #(10 -4 3 20 9 -15 -33) fold:[:max :el| max max:el] 
+     #(10 -4 3 20 9 -15 -33) maxApplying:[:el| el abs] 
+     #(10 -4 3 20 9 -15 -33) maxApplying:#abs 
      (1 to:10) fold:#+
      (1 to:15) fold:[:x :y| '(', x printString, '+', y printString, ')']
      (1 to:15) reduce:[:x :y| '(', x printString, '+', y printString, ')']
@@ -6101,6 +6104,7 @@
      #() max                                        -> Error
      #(15 1 -9 -20 10 5) max                        -> 15
      #(15 1 -9 -20 10 5) maxApplying:[:el | el abs] -> 20
+     #(15 1 -9 -20 10 5) maxApplying:#abs           -> 20
     "
 
     "Created: / 23-08-2010 / 11:02:50 / cg"