Implement PartialEq and PartialOrd resolves #7

This commit is contained in:
2021-05-30 12:25:20 -04:00
parent e070441c31
commit 1da08c0a43
5 changed files with 40 additions and 17 deletions

View File

@@ -61,6 +61,8 @@ fn interpret_define(args: &Vec<Datum>, env: &mut Env) -> Datum {
panic!("INTERPRET-DEFINE -- parameter not a symbol {:?}", p);
}
}
// FIXME: we need to keep the current environment here otherwise closures will not work
// FIXME: also create a dedicated enum-type for procedures instead of putting it into a vector
let lambda_parameters = Datum::List(parameters);
let lambda_body = Datum::List(args[2..].to_vec());
let lambda = Datum::List(vec![make_symbol("lambda"), lambda_parameters, lambda_body]);