[include]

include is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Evaluates child slots and includes all returned nodes into each selected node.

  • Value (node-list), required: Expression selecting the destination node or nodes to include into
  • Returns: Resolves to the matched destination nodes after all returned child nodes have been included

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
any node name lambda yes Executable body evaluated once per selected node; all returned child nodes are included into that selected node. Can be repeated.

Guide: How to use [include]

JSON declaration

This is the complete declaration of include, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "include",
  "description": "Evaluates child slots and includes all returned nodes into each selected node",
  "signature": {
    "input": {
      "kind": "node-list",
      "description": "Expression selecting the destination node or nodes to include into",
      "required": true,
      "mode": "Expression"
    },
    "children": {
      "*": {
        "type": "lambda",
        "description": "Executable body evaluated once per selected node; all returned child nodes are included into that selected node",
        "required": true,
        "mode": "ExecutableLambda",
        "cardinality": "OneOrMore",
        "role": "ExecutableBody",
        "evaluation": "EvalSelf",
        "projection": "ReturnedResult"
      }
    },
    "output": {
      "mode": "Lambda",
      "kind": "node-list",
      "description": "Resolves to the matched destination nodes after all returned child nodes have been included"
    }
  }
}

← if all core slots insert-after →