[lambda2hyper]

lambda2hyper is a core slot, one of the keywords of the Hyperlambda language, in Hyperlambda, the language of Magic Cloud. Transforms a lambda hierarchy into Hyperlambda.

  • Value (lambda-tree,node-list), optional: Expression selecting the lambda hierarchy to transform
  • Returns: Resolves to the generated Hyperlambda source

Arguments

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

Argument Type Required Description
[comments] bool no Whether generated Hyperlambda should include comments. Default: false.
any node name lambda no Nodes to convert, used when the slot has no value. Can be repeated.

Guide

How to use lambda2hyper

JSON declaration

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

JSON declaration
{
  "name": "lambda2hyper",
  "description": "Transforms a lambda hierarchy into Hyperlambda",
  "signature": {
    "input": {
      "kind": "lambda-tree,node-list",
      "description": "Expression selecting the lambda hierarchy to transform",
      "required": false,
      "mode": "Expression"
    },
    "children": {
      "comments": {
        "type": "bool",
        "description": "Whether generated Hyperlambda should include comments",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "default": "false",
        "role": "Option",
        "projection": "Value"
      },
      "*": {
        "type": "lambda",
        "description": "Nodes to convert, used when the slot has no value",
        "required": false,
        "mode": "SourceLambda",
        "cardinality": "ZeroOrMore",
        "role": "Payload",
        "projection": "Self"
      }
    },
    "output": {
      "mode": "Value",
      "kind": "hyperlambda,text",
      "description": "Resolves to the generated Hyperlambda source"
    }
  }
}

← lambda2html all core slots lambda2json →