2014-03-25 18:26:55 +04:00
|
|
|
a := #(1 'hi' 3.14 1 2 (4 5))
|
|
|
|
(a at: 3) displayNl "3.14"
|
|
|
|
(a reverse) displayNl "((4 5) 2 1 3.14 'hi' 1)"
|
|
|
|
(a asSet) displayNl "Set(1 'hi' 3.14 2 (4 5))"
|
|
|
|
.
|
|
|
|
hash := Dictionary from: { 'water' -> 'wet'. 'fire' -> 'hot' }.
|
2014-04-18 17:22:46 +04:00
|
|
|
hash at: 'fire' displayNl. "Prints: hot"
|
|
|
|
hash keysAndValuesDo: [ :k :v | ('%1 is %2' % { k. v }) displayNl ].
|