[return]
return is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Returns a value, expression result, or child nodes to the nearest caller.
- Value (
return-value,node-list), optional: Value or expression to return when no child nodes are supplied; one expression match returns its value, multiple matches return cloned nodes - Returns: Resolves to the supplied value and/or returned child nodes captured by the nearest caller
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
| any node name | object | no | Child node forwarded to the nearest caller without evaluation; when children exist, all children are returned as-is. Can be repeated. |
JSON declaration
This is the complete declaration of return, as the running system describes it. It is also published as slot.json.
JSON declaration
{
"name": "return",
"description": "Returns a value, expression result, or child nodes to the nearest caller",
"signature": {
"input": {
"kind": "return-value,node-list",
"description": "Value or expression to return when no child nodes are supplied; one expression match returns its value, multiple matches return cloned nodes",
"required": false,
"mode": "ValueOrExpression"
},
"children": {
"*": {
"type": "object",
"description": "Child node forwarded to the nearest caller without evaluation; when children exist, all children are returned as-is",
"required": false,
"mode": "SourceLambda",
"cardinality": "ZeroOrMore",
"role": "Payload",
"projection": "Self"
}
},
"output": {
"mode": "Both",
"kind": "return-value,node-list",
"description": "Resolves to the supplied value and/or returned child nodes captured by the nearest caller"
}
}
}
← remove-nodes |
all core slots | return-nodes → |