--- a/Dictionary.st Wed Sep 04 16:16:06 2019 +0200
+++ b/Dictionary.st Wed Sep 04 16:16:19 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
@@ -559,26 +557,6 @@
"Modified: / 26.2.1998 / 19:10:09 / stefan"
!
-at:aKey ifPresent:aBlock
- "try to retrieve the value stored at aKey.
- If there is nothing stored under this key, do nothing.
- Otherwise, evaluate aBlock, passing the retrieved value as argument."
-
- |v|
-
- v := self at:aKey ifAbsent:[^ nil].
- ^ aBlock value:v.
-
- "
- |d|
- d := Dictionary new.
- d at:#foo put:'yes this is foo'.
-
- d at:#foo ifPresent:[:val | Transcript showCR:'the value of foo is: ',val].
- d at:#bar ifPresent:[:val | Transcript showCR:'the value of bar is: ',val].
- "
-!
-
at:aKey ifPresent:presentBlock ifAbsent:absentBlock
"try to retrieve the value stored at aKey.
If there is nothing stored under this key,