Some lambda work

This commit is contained in:
greg 2017-12-12 02:56:10 -08:00
parent 7e8c4267c2
commit 192a6bf6e1

View File

@ -138,8 +138,16 @@ impl EvaluatorState {
_ => return Err(format!("Bad assignment")), _ => return Err(format!("Bad assignment")),
} }
"lambda" => match operands { "lambda" => match operands {
Cons(box paramlist, box Cons(box formalexp, box Nil)) => { Cons(box mut paramlist, box Cons(box formalexp, box Nil)) => {
unimplemented!() //needs to return an abstract object let mut formal_params = vec![];
{
let mut ptr = &mut paramlist;
}
FnLiteral {
formal_params,
body: Box::new(formalexp)
}
}, },
_ => return Err(format!("Bad lambda expression")), _ => return Err(format!("Bad lambda expression")),
}, },