macro_rules! app {
($term1:expr, $($term2:expr),+) => { ... };
}Expand description
Constructs a Term from a sequence of function applications.
The app! macro can be used to conveniently construct a Term from a
sequence of function applications without all the nested calls of the app
functions which would be the alternative way.
ยงExamples
#[macro_use]
extern crate lamcal;
use lamcal::{app, lam, var};
let expr = app![
lam("x", var("x")),
lam("y", app!(var("x"), var("y"))),
var("z")
];
assert_eq!(
expr,
app(
app(lam("x", var("x")), lam("y", app(var("x"), var("y")))),
var("z")
)
);