diff --git a/doc/sample/Expressions.im b/doc/sample/Expressions.im index 4a50272..5e7bf01 100644 --- a/doc/sample/Expressions.im +++ b/doc/sample/Expressions.im @@ -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. \ No newline at end of file +pkg at:index put:32.