[else]
else is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Evaluates its child lambda when every preceding [if] and [else-if] condition was false.
- Scope: provides
if
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
| any node name | lambda | yes | Fallback branch body evaluated when previous conditions fail. Can be repeated. |
Constraints
- PreviousSiblingMustBeOneOf: Previous sibling must be one of the listed slot names (
[if],[else-if])
Guide: How to use [else]
JSON declaration
This is the complete declaration of else, as the running system describes it. It is also published as slot.json.
JSON declaration
{
"name": "else",
"description": "Evaluates its child lambda when every preceding [if] and [else-if] condition was false",
"signature": {
"children": {
"*": {
"type": "lambda",
"description": "Fallback branch body evaluated when previous conditions fail",
"required": true,
"mode": "ExecutableLambda",
"cardinality": "OneOrMore",
"role": "ExecutableBody",
"evaluation": "EvalSelf",
"projection": "Self"
}
},
"constraints": [
{
"description": "Previous sibling must be one of the listed slot names",
"values": [
"if",
"else-if"
],
"kind": "PreviousSiblingMustBeOneOf"
}
],
"scope": {
"provides": "if"
}
}
}
← default |
all core slots | else-if → |