_lambda var body -- lambda binding: var should be a string or number, body is an AST
_apply func arg -- function application: func can be any AST function except a _prim
_prim arg rest -- primitive call: rest is either a _lit, a _ref, or another _prim (which allows more args)
The AST functions serve as an embedded DSL.
## Examples
eval x = 𝛍x . x -- evaluates x
apply func arg = 𝛍 func arg . _apply (_lit func) (_lit arg)
compile code-string -- function returning AST
## Parser macros
How these work depends on the parser you use, but they run Lazp code at parse-time. Parser macros can implement things like splicing primitive values into the AST and importing libraries, but the most important thing is that they allow developers to extend the parser. Parser macros can be activated using a standard parser macro (of course :) ).
## Implementation

|
|
|

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

_lambda var body -- lambda binding: var should be a string or number, body is an AST
_apply func arg -- function application: func can be any AST function except a _prim
_prim arg rest -- primitive call: rest is either a _lit, a _ref, or another _prim (which allows more args)
The AST functions serve as an embedded DSL.
## Examples
eval x -- evaluates x
apply func arg = eval (_apply (_lit func) (_lit arg))
compile code-string -- returns an AST for a string of Lazp code
## Parser macros
How these work depends on the parser you use, but they run Lazp code at parse-time. Parser macros can implement things like splicing primitive values into the AST and importing libraries, but the most important thing is that they allow developers to extend the parser. Parser macros can be activated using a standard parser macro (of course :) ).
## Implementation

This page was generated in about
0.016s by
Fossil 2.7 [9aa9ba8bd2] 2018-09-22 17:40:11