App { func :: Expr, arg :: Expr }
| Field | Type | Description |
func | Expr | The function expression being applied |
arg | Expr | The argument expression |
# Nix
f x
# AST
{
"tag": "App",
"func": { "tag": "Sym", "contents": "f" },
"arg": { "tag": "Sym", "contents": "x" }
}
# Nix
f x y
# AST (left-associative)
{
"tag": "App",
"func": {
"tag": "App",
"func": { "tag": "Sym", "contents": "f" },
"arg": { "tag": "Sym", "contents": "x" }
},
"arg": { "tag": "Sym", "contents": "y" }
}
syntax.mkApp (syntax.mkSym "f") (syntax.mkSym "x")