Skip to content

Latest commit

 

History

History
123 lines (78 loc) · 1.21 KB

File metadata and controls

123 lines (78 loc) · 1.21 KB

Specification for the Lambda prog (\lprog) language (WIP)

This is the official \lprog language specification document

Language Elements:

Variables

Syntax:

variable

Functions

Syntax:

\ variable. ANY
\a. \b. \c. ANY
\ a, b, c. ANY

Applications

Syntax:

(ANY, ANY)

The following two lines are equivalent:

((F, G) H)
(F, G, H)
(ANY)
ANY

Macros

Syntax:

MACRO

Strings

Syntax:

"string"

Directives

Display

Syntax:

(& ANY)

Tree

Displays the element given in argument as Tromp Diagram (See https://tromp.github.io/cl/diagrams.html)

Syntax:

(# ANY)

Tree representation for the number 6.

━┯━┯━┯━┯━┯━━━
━┿━┿━┿━┿━┿━┯━
 │ │ │ │ │─┘
 │ │ │ ├─┘
 │ │ ├─┘
 │ ├─┘
 ├─┘

Macro Definition

Syntax:

(@ MACRO ANY)
((@ MACRO) ANY)

Any directives placed after the macro definition symbol will be applied to the macro data (the ANY above)

Include

Syntax:

(* "path_to_file")

Behaviors