From 60644ba3d76c0c00be7aac4cd4534847f392b23e Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 10 Dec 2017 03:58:44 -0800 Subject: [PATCH] Starting lambdas --- src/rukka_lang/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rukka_lang/mod.rs b/src/rukka_lang/mod.rs index 1e0b683..90f639d 100644 --- a/src/rukka_lang/mod.rs +++ b/src/rukka_lang/mod.rs @@ -22,6 +22,7 @@ impl EvaluatorState { self.vars.get(var) } fn push_env(&mut self) { + } fn pop_env(&mut self) { @@ -124,7 +125,12 @@ impl EvaluatorState { }, _ => return Err(format!("Bad assignment")), } - "lambda" => unimplemented!(), + "lambda" => match operands { + Cons(box paramlist, box Cons(box formalexp, box Nil)) => { + unimplemented!() //needs to return an abstract object + }, + _ => return Err(format!("Bad lambda expression")), + }, "if" => match operands { Cons(box test, box body) => { let truth_value = test.truthy();