Opcode: null

Parameters

``

Returns

null

Description

Evaluates to the immediate null value and cannot have any parameters. Null is returned any time there would be a not-a-number result (NaN), such as dividing zero by zero or adding null to a number, or when intermixed with string operations.

Details

  • Permissions required: none
  • Allows concurrency: false
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: false
  • Value newness (whether references existing node): null

    Examples

    Example:

    .null
    

    Output:

    .null
    

    Example:

    (lambda .null )
    

    Output:

    .null
    

    Example:

    (lambda
    	
     #annotation
     .null
    )
    

    Output:

    #annotation
    .null
    

Amalgam Opcodes

Opcode: bool

Parameters

``

Returns

bool

Description

A boolean value that may hold true and false as .true and .false respectively.

Details

  • Permissions required: none
  • Allows concurrency: false
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: false
  • Value newness (whether references existing node): new

    Examples

    Example:

    .true
    

    Output:

    .true
    

    Example:

    .false
    

    Output:

    .false
    

Amalgam Opcodes

Opcode: number

Parameters

``

Returns

number

Description

A 64-bit floating point value. Note that .infinity and -.infinity are used to denote infinite values and not-a-number is transformed into a null value.

Details

  • Permissions required: none
  • Allows concurrency: false
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: false
  • Value newness (whether references existing node): new

    Examples

    Example:

    1
    

    Output:

    1
    

    Example:

    1.5
    

    Output:

    1.5
    

    Example:

    6.02214076e+23
    

    Output:

    6.02214076e+23
    

    Example:

    .infinity
    

    Output:

    .infinity
    

    Example:

    (-
     (* 3 .infinity)
    )
    

    Output:

    -.infinity
    

Amalgam Opcodes

Opcode: string

Parameters

``

Returns

string

Description

A string. Many opcodes assume UTF-8 formatted strings, but many, such as format, can work with any bytes. Internally, the string is just a sequence of bytes, but when specifying a string to be parsed, \ is the escape character and the values that can be escaped are null character as \0, \ as \\, " as \", tab as \t, newline as \n, and carriage return as \r.

Details

  • Permissions required: none
  • Allows concurrency: false
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: false
  • Value newness (whether references existing node): new

    Examples

    Example:

    "hello"
    

    Output:

    "hello"
    

    Example:

    "\tHello\n\"Hello\""
    

    Output:

    "\tHello\n\"Hello\""
    

Amalgam Opcodes

Opcode: list

Parameters

any node1 any node2 ...

Returns

list

Description

Evaluates to a list with the parameters as elements. Pushes a new target scope such that (target), (current_index), and (current_value) access the list itself, the current index, and the current value. If []’s are used instead of parenthesis, the keyword list may be omitted. [] are considered identical to (list). Note that because this is an opcode that constructs a new list rather than modifying one, it will not retain metadata of the constructing list.

Details

  • Permissions required: none
  • Allows concurrency: true
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: true
  • Value newness (whether references existing node): conditional

    Examples

    Example:

    ["a" 1 "b"]
    

    Output:

    ["a" 1 "b"]
    

Amalgam Opcodes

Opcode: unordered_list

Parameters

any node1 any node2 ...

Returns

unordered_list

Description

Evaluates to the list specified by parameters as elements. Pushes a new target scope such that (target), (current_index), and (current_value) access the unordered list itself, the current index, and the current value. It operates like a list, except any operations that would normally consider a list’s order. For example, union, intersect, and mix, will consider the values unordered. Note that because this is an opcode that constructs a new list rather than modifying one, it will not retain metadata of the constructing list.

Details

  • Permissions required: none
  • Allows concurrency: true
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: true
  • Value newness (whether references existing node): conditional

    Examples

    Example:

    (unordered_list 4 4 5)
    

    Output:

    (unordered_list 4 4 5)
    

    Example:

    (unordered_list
     (unordered_list 4 4 5)
     (unordered_list 4 5 6)
    )
    

    Output:

    (unordered_list
     (unordered_list 4 4 5)
     (unordered_list 4 5 6)
    )
    

    Example:

    (=
     (unordered_list 4 4 5)
     (unordered_list 4 4 5)
    )
    

    Output:

    .true
    

    Example:

    (=
     (unordered_list 4 4 5)
     (unordered_list 4 4 6)
    )
    

    Output:

    .false
    

    Example:

    (=
     (unordered_list 4 4 5)
     (unordered_list 4 4 5)
    )
    

    Output:

    .true
    

    Example:

    (=
     (set_type
         (range 0 100)
         "unordered_list"
     )
     (set_type
         (reverse
             (range 0 100)
         )
         "unordered_list"
     )
    )
    

    Output:

    .true
    

Amalgam Opcodes

Opcode: assoc

Parameters

[any index1] [any value1] [any index2] [any value2] ...

Returns

assoc

Description

Evaluates to an associative list, where each pair of parameters (e.g., index1 and value1) comprises a index-value pair. Pushes a new target scope such that (target), (current_index), and (current_value) access the assoc, the current index, and the current value. If any index does not have reserved characters or whitespace, then quotes are optional; if whitespace or reserved characters are present, then quotes are required. If {}’s are used instead of parenthesis, the keyword assoc may be omitted. {} are considered identical to (assoc). The iteration order of an assoc is the same as insertion order. If code is used for keys, the code will be stripped of comments and annotations and the order of any assocs will lose insertion order and instead be ordered by a natural string sort. Further, if a list is used as the outer opcode of a key, any opcodes that access elements of the assoc via keys that accept walk paths will need to surround the list with another list. For example, if a key is [1], it will need to be accessed via a walk path as [[1]]. Note that because this is an opcode that constructs a new assoc rather than modifying one, it will not retain metadata of the constructing assoc.

Details

  • Permissions required: none
  • Allows concurrency: true
  • Requires entity: false
  • Creates new scope: false
  • Creates new target scope: true
  • Value newness (whether references existing node): conditional

    Examples

    Example:

    (unparse
     {b 2 c 3}
    )
    

    Output:

    "{b 2 c 3}"
    

    Example:

    (unparse
     {.null 0 (+ 1 2) 3}
    )
    

    Output:

    "{.null 0 (+ 1 2) 3}"
    

Amalgam Opcodes


This site uses Just the Docs, a documentation theme for Jekyll.