From 622b50a40c6ef80fbd7fb5c4e31a95cb71520937 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 12 Dec 2017 02:56:10 -0800 Subject: [PATCH] Some lambda work --- src/rukka_lang/mod.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rukka_lang/mod.rs b/src/rukka_lang/mod.rs index 334f65b..478d975 100644 --- a/src/rukka_lang/mod.rs +++ b/src/rukka_lang/mod.rs @@ -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")), },