Some lambda work

This commit is contained in:
greg 2017-12-12 02:56:10 -08:00
parent 9f916c7c02
commit 622b50a40c
1 changed files with 10 additions and 2 deletions

View File

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