Core keywords
89 slots, each with its own page and JSON declaration. See how this reference is built.
| Slot | Description |
|---|---|
add |
Appends source nodes to selected destination containers. |
and |
Returns true if all children evaluate to true. |
apply |
Stamps a template lambda with values from child argument nodes, producing one fully-substituted output per [.dp]. |
case |
Evaluates a single case branch inside [switch]. |
compose |
Builds an expression at runtime by concatenating the evaluated child node values; useful for dynamic node selection. |
context |
Creates a named stack context object retrievable with [get-context] while evaluating a lambda block. |
convert |
Coerces a value to a different CLR type; useful for parsing strings into numbers, dates, booleans, or other strongly-typed values. |
csv2lambda |
Transforms CSV into a lambda hierarchy. |
default |
Evaluates the default branch inside [switch]. |
else |
Evaluates its child lambda when every preceding [if] and [else-if] condition was false. |
else-if |
Evaluates the child lambda when its condition is true and no preceding [if]/[else-if] branch matched. |
eq |
Returns true if two operands are equal. |
eval |
Executes a lambda block; use it to run a node tree dynamically or to scope a group of statements. |
execute |
Invokes a dynamic slot after unwrapping descendant expressions. |
execute-file |
Loads a Hyperlambda file and evaluates it as if it were inlined; child nodes become its [.arguments]. |
exists |
Returns true if the specified node or expression exists. |
filter |
Filters selected nodes using the child lambda as a predicate. |
floatArray2bytes |
Serializes a sequence of float values into raw bytes; useful for embedding vectors or feeding binary APIs. |
for-each |
Iterates over the nodes matching the expression and evaluates the child lambda once per node as [.dp]. |
fork |
Spawns a fire-and-forget background thread that evaluates the child lambda; the parent continues immediately. |
format |
Formats a value using a .NET format string and optional culture; useful for currencies, dates, and number rendering. |
get-context |
Returns a stack value or context object from the current execution context. |
get-count |
Returns the number of matching nodes. |
get-first-value |
Returns the first non-null value produced by candidate child nodes. |
get-name |
Returns the name of the first matching node. |
get-nodes |
Returns clones of every node matching the expression as children of the current node. |
get-value |
Returns the value of the first matching node. |
html-decode |
HTML decodes the specified string. |
html2lambda |
Transforms HTML into a lambda hierarchy. |
html2markdown |
Transforms HTML into Markdown. |
html2pdf |
Converts HTML into a PDF document. |
hyper2lambda |
Transforms Hyperlambda into a lambda hierarchy. |
if |
Evaluates the child lambda only if the condition is true; chain with [else-if] and [else] for additional branches. |
include |
Evaluates child slots and includes all returned nodes into each selected node. |
insert-after |
Inserts nodes after the specified target node. |
insert-before |
Inserts nodes before the specified target node. |
int2words |
Spells an integer out in English words (e.g. 557 becomes ‘five hundred and fifty seven’); handy for invoices and cheques. |
invoke |
Invokes a lambda expression as a callable slot. |
join |
Waits for one or more child [fork] operations to finish before proceeding. |
json2lambda |
Transforms JSON into a lambda hierarchy. |
json2lambda-stream |
Transforms JSON stream content into a lambda hierarchy. |
json2yaml |
Transforms JSON into YAML. |
lambda2csv |
Transforms a lambda hierarchy into CSV. |
lambda2html |
Transforms a lambda hierarchy into HTML. |
lambda2hyper |
Transforms a lambda hierarchy into Hyperlambda. |
lambda2json |
Transforms a lambda hierarchy into JSON. |
lambda2xml |
Converts a lambda object to an XML fragment or document. |
lambda2yaml |
Transforms a lambda hierarchy into YAML. |
lt |
Returns true if the first operand is less than the second operand. |
lte |
Returns true if the first operand is less than or equal to the second operand. |
map |
Maps selected nodes into a new result set using the child lambda. |
markdown2html |
Transforms Markdown into HTML. |
mt |
Returns true if the first operand is greater than the second operand. |
mte |
Returns true if the first operand is greater than or equal to the second operand. |
neq |
Returns true if two operands are not equal. |
not |
Negates a boolean expression. |
not-exists |
Returns true if the specified node or expression does not exist. |
not-null |
Returns true if the specified node or expression is not null. |
null |
Returns true if the specified node or expression is null. |
or |
Returns true if any child expression evaluates to true. |
pdf2text |
Extracts text from a PDF file or stream. |
reference |
Returns the first matched node as a live reference so callers can mutate it in place rather than copy its value. |
remove-nodes |
Removes nodes from the lambda graph. |
return |
Returns a value, expression result, or child nodes to the nearest caller. |
return-nodes |
Returns child nodes or evaluated nodes to the nearest caller. |
return-value |
Returns a value to the caller. |
semaphore |
Serializes access to a critical section by name; only one thread at a time can enter a given semaphore. |
set-name |
Sets the name of matching nodes. |
set-value |
Sets node values in the lambda graph. |
set-x |
Sets node values without evaluating expressions in the source. |
signal |
Invokes a dynamic slot created with [slots.create], passing child nodes as its arguments. |
sleep |
Delays execution for the specified number of milliseconds. |
sort |
Sorts selected nodes using the child lambda as a comparer. |
switch |
Evaluates one of several branches based on the input value. |
throw |
Aborts execution by throwing an exception with the given message; optionally attach status code and public flag. |
time |
Constructs a TimeSpan value from child nodes. |
try |
Evaluates the protected body; pair with [.catch] to handle exceptions and/or [.finally] to always run cleanup. |
try-signal |
Invokes a dynamic slot if it exists and ignores missing slots. |
type |
Returns the CLR type name of a value. |
types |
Lists every CLR type name recognized by Hyperlambda; useful when [convert] or [type] needs a valid target. |
unwrap |
Forward-evaluates expression values on the selected nodes, replacing them with their resolved values; commonly used before [signal] or [add]. |
version |
Returns the Magic Cloud version to the caller. |
vocabulary |
Lists available compiled slots. |
while |
Repeats execution while a condition is true. |
whitelist |
Evaluates a lambda with a restricted whitelist of allowed slots. |
xml2lambda |
Transforms XML into a lambda hierarchy. |
yaml2json |
Transforms YAML into JSON. |
yaml2lambda |
Transforms YAML into a lambda hierarchy. |
yield |
Returns multiple child nodes or evaluated nodes to the caller. |