Context - Geomol/World GitHub Wiki
Usage
context block
Description
Define a unique, underived context.
context is a function!
Arguments
block -- Context variables and values. [block!]
Special attributes
throw
Examples
w> c: context [a: 1 c: [print a + a]]
w> type? c
== context!
w> help c
c is a context! of value:
a integer! 1
c block! length: 4
w> c/a
== 1
w> c/c
== [print a + a]
w> do c/c
2
The context c includes two named items, a and c. Accessed by name from the top level as c/a and c/c.
w> a
** Script error: a has no value
** Near: a
a is defined inside the context c, and in this example, is not exposed to the top level.