diff --git a/src/pebblisp.c b/src/pebblisp.c index 4172763..736a83f 100644 --- a/src/pebblisp.c +++ b/src/pebblisp.c @@ -224,10 +224,14 @@ Object eval(const Object *obj, struct Environment *env) Object rest[length]; eval_forms(rest, obj, env); - Object func_eval = first_eval.func(rest[0], rest[1]); + Object func_eval = rest[0]; + for(int i = 1; i < length; i++) { + func_eval = first_eval.func(func_eval, rest[i]); + } // deleteList(obj); return func_eval; + } else if (first_eval.type == TYPE_LAMBDA) { struct Environment newEnv = envForLambda(&first_eval.lambda->params, first_form->forward, env); diff --git a/src/tokens.c b/src/tokens.c index f4bfd80..5bbfac1 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -5,7 +5,6 @@ #include #else #include -// #define printf(...) nf_tokenize(NULL) #endif /*