Some lambda work
This commit is contained in:
parent
7e8c4267c2
commit
192a6bf6e1
@ -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")),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user