3 struct Expr empty_scope(void)
8 struct Expr get_scope_value(struct Expr scope, struct Expr name)
12 struct Expr value = assoc(name, scope.cons->car);
13 return nil_p(value) ? get_scope_value(scope.cons->cdr, name) : value;
21 struct Expr set_scope_value(struct Expr scope, struct Expr name, struct Expr value)
26 /* TODO: set_scope_value is not implemented */
31 struct Expr push_scope_frame(struct Expr scope)
33 return CONS(empty_scope(), scope);
36 struct Expr pop_scope_frame(struct Expr scope)
38 if (scope.type == EXPR_CONS) {
39 return scope.cons->cdr;