Words and contexts

A word names a value in a context: the context it is bound to. These functions read and set what words name, bind words to contexts, and look into objects and maps. See words and blocks and contexts.

get

The value a word refers to.

get word
  • word (any-word!)

  • /any

set

Sets a word, or each word of a block, to a value.

set word value
  • word (any-word! block!)

  • value (any-type!)

unset

Takes the value away from a word, or from each word of a block.

unset word
  • word (any-word! block!)

in

The word of an object, bound to it, or none if the object has no such word.

in object word
  • object (any-object!)

  • word (any-word!)

use

Evaluates a block with words of its own, which exist only inside it.

use words body
  • words (block! word!)

  • body (block!)

bind

Binds the words of a block to a context.

bind words context
  • words (block! any-word!)

  • context (any-word! any-object!)

  • /new

  • /copy: Binds a deep copy and leaves the block as it was

bound?

The context a word is bound to, or none.

bound? word
  • word (any-word!)

context?

The context a word is bound to, or none.

context? word
  • word (any-word!)

context

Makes an object.

context spec
  • spec (block!)

collect-words

The words used in a block, each once.

collect-words block
  • block (block!)

  • /deep

  • /set

  • /ignore words (block!)

words-of

The words of an object or map, or the arguments, refinements and local words of a function.

words-of value
  • value (any-object! map! any-function!)

values-of

The values of an object or map.

values-of value
  • value (any-object! map!)

default

Sets a word to a value if it has none yet; gives the word’s value.

default 'word value
  • 'word (word! set-word!)

  • value (any value)