contains behavior related to literals

Mimics
Inactive cells
Active cells
Specs
Inactive cells (details)
inspect = "DefaultBehavior Literals"
kind = "DefaultBehavior Literals"
notice = "DefaultBehavior Literals"
Active cells (details)
'(...)

Takes one code argument and returns the message chain corresponding to this code argument. The code is copied, so it is safe to modify the resulting chain.

macro(
  call arguments [](0) deepCopy)
''(...)

Takes one code argument and returns the message chain corresponding to this code argument, except that any occurrance of ` and `` will be expanded in some way, based on a set of simple rules: the argument to ` will be evaluated and what happens will depend on what the result of this evaluation is - if it returns a message chain, that message chain will be spliced in at the point of the ` message. - if it is not a message chain, the literal value will be cached, exactly like the Message#wrap method does. if a ` form is followed by an empty message with arguments, that empty message will be deleted and the arguments to it will be added to the result of the ` form. if a `` is encountered, a literal ` message will be inserted at that point. all code evaluations will happen in the ground of the caller.

macro(
  DefaultBehavior Literals cell(:("''")) translate(call arguments [](0) deepCopy, call ground) 
  )
..(to)

will create and return an inclusive Range from the receiver to the 'to' argument.

method(to, 
  Range inclusive(cell(:("@")), cell(:to)))
...(to)

will create and return an exclusive Range from the receiver to the 'to' argument.

method(to, 
  Range exclusive(cell(:("@")), cell(:to)))
:(symbolText)

Takes one evaluated argument that is expected to be a Text, and returns the symbol corresponding to that text

=>(other)

Takes one evaluated argument and returns a new Pair of the receiver and the argument

[](...)

Takes zero or more arguments and returns a newly created list containing the result of evaluating these arguments

macro(
  call evaluatedArguments)
`(value)

Takes one argument and returns a message that wraps the value of that argument. The message has no name and will be printed empty. The message is guaranteed to be created from scratch

method(value, 
  Message wrap(value))
dict(+pairs, +:keywordPairs)

creates a new Dict from the arguments provided. these arguments can be two different things - either a keyword argument, or a pair. if it's a keyword argument, the entry added to the dict for it will be a symbol with the name from the keyword, without the ending colon. if it's not a keyword, it is expected to be an evaluated pair, where the first part of the pair is the key, and the second part is the value.

list(...)

Takes zero or more arguments and returns a newly created list containing the result of evaluating these arguments

macro(
  call evaluatedArguments)
message(name)

returns a new message with the name given as argument to this method.

set(+elements)

creates a new Set from the result of evaluating all arguments provided.

tuple(+args)

Takes zero or more arguments and return an appropriate tuple from those arguments

method(+args, 
  len = args length 
  tup = if(len ==(0), 
      Tuple, 
      if(len ==(2), 
        Tuple Two, 
        if(len ==(3), 
          Tuple Three, 
          if(len ==(4), 
            Tuple Four, 
            if(len ==(5), 
              Tuple Five, 
              if(len ==(6), 
                Tuple Six, 
                if(len ==(7), 
                  Tuple Seven, 
                  if(len ==(8), 
                    Tuple Eight, 
                    if(len ==(9), 
                      Tuple Nine, 
                      Tuple Many))))))))) 
  tup createFrom(args) 
  )
{}(...)

nil

macro(
  call resendToMethod("dict"))
?()

returns a new empty set

method(
  set)