At-Maps
At-maps are multimaps that can be declared and used in format strings. Their keys can be associated with multiple values.
When used with functions that accept at-maps, the objects are used directly. When converted to a string, at-maps use the stringified version of the first available value. This behavior enables using at-maps to represent basic logic branches.
For example, the following expressions have equivalent results:
$IfElse($token $token default)@($token:$token;1:default)@($token;default)
Defining At-Maps
At-maps are defined with an @ sign and enclosed by parentheses.
Keys and values are separated by a colon, and entries are separated by a semicolon.
@()
An empty at-map. Evaluates to the empty string and (like the empty string) is treated as falsy in boolean operations.
@(key:value)
An at-map with a single key-value pair. Evaluates tovalue. Ifkeyis falsy or evaluates the empty string, it is not added to the at-map. Falsy values are allowed.
@(value)
Specifies an at-map withvalueas both the key and value. For example,@(1)is equivalent to@(1:1).
@(A;B)@(A;B:C)@(A:B;C)@(A:B;C:D)
Specifies an at-map with multiple values. The described syntaxes can be combined as desired.
@($_map:value)
(where$_mapis an at-map) Specifies an at-map with all of the values of$_mapmapped tovalue. For example,@(@(A;B):value)is equivalent to@(A:value;B:value).