doc: adjust package messages; add more sample code
This commit is contained in:
@@ -142,7 +142,7 @@ pkg = { { 0 }, { 1 }, { y for y in huh } }.
|
||||
pkg = { x multiplyBy:2 for x in wow if x > 2 }.
|
||||
|
||||
pkg->x = 32.
|
||||
K = (1 multiplyBy:2, 4).
|
||||
k = (1 multiplyBy:2, 4).
|
||||
|
||||
for (x, y) in pkg do
|
||||
cout put:'{x}: {y}'
|
||||
@@ -153,8 +153,22 @@ pkg[0] = 16.
|
||||
/* All of these accesses are equivalent */
|
||||
pkg['x'] = 32.
|
||||
pkg->x = 32.
|
||||
pkg put:32 at:'x'.
|
||||
pkg at:'x' put:32.
|
||||
|
||||
v = pkg['x'].
|
||||
v = pkg->x.
|
||||
v = pkg at:'x'.
|
||||
|
||||
pkg2 = {
|
||||
onEnter => [
|
||||
cout put:'start!'
|
||||
],
|
||||
|
||||
onExit => [
|
||||
cout put:'end!'
|
||||
]
|
||||
}.
|
||||
|
||||
index = 'x'.
|
||||
pkg[index] = 32.
|
||||
pkg put:32 at:index.
|
||||
pkg at:index put:32.
|
||||
|
||||
Reference in New Issue
Block a user