#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Sun, 05 Aug 2018 13:54:33 +0200
changeset 23260 12111fbb1dad
parent 23259 4b544a108e4e
child 23261 7afe7f44be65
#DOCUMENTATION by cg class: Collection comment/format in: #doIfNotNil:
Collection.st
--- a/Collection.st	Fri Aug 03 12:57:34 2018 +0200
+++ b/Collection.st	Sun Aug 05 13:54:33 2018 +0200
@@ -360,6 +360,7 @@
     ^ self == Collection
 ! !
 
+
 !Collection methodsFor:'Compatibility-ANSI'!
 
 identityIncludes:anObject
@@ -3111,11 +3112,14 @@
 !
 
 doIfNotNil:aBlock
-    "evaluate aBlock for each element in the collection"
+    "if I am a collection, then enumerate myself into aBlock.
+     if I am nil, then do nothing.
+     Otherwise, evaluate aBlock with myself as argument."
 
     ^ self do:aBlock
 
     "Created: / 20-03-2018 / 15:37:29 / stefan"
+    "Modified (comment): / 05-08-2018 / 11:26:46 / Claus Gittinger"
 !
 
 doWhileTrue:aBlock