blob: 1c9fe8edafbec1e6f50115df0e02231fc62cee86 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#[macro_export]
macro_rules! primitive {
($env:expr, $arity:expr, $name:expr, $closure:expr) => {
let val = crate::lisp::expr::LispExpr::PrimitiveFunc(crate::lisp::expr::PrimitiveFunc {
arity: $arity,
closure: $closure,
});
let _ = $env.insert($name.to_string(), val);
};
}
|