diff --git a/src/pebblisp.c b/src/pebblisp.c index 075b78e..5ba62a0 100644 --- a/src/pebblisp.c +++ b/src/pebblisp.c @@ -14,6 +14,15 @@ Object evalDefArgs(const Object *argForms, struct Environment *env) const Object *newSymbol = argForms; const char *name = newSymbol->string; + if(argForms->type == TYPE_LIST && argForms->forward->type == TYPE_LIST) { + FOR_POINTERS_IN_LISTS(argForms, argForms->forward) { + Object newValue = eval(P2, env); + addToEnv(env, P1->string, newValue); + cleanObject(&newValue); + } + return cloneObject(*newSymbol); + } + Object newValue = eval(newSymbol->forward, env); addToEnv(env, name, newValue);