tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 2060059df75b5a39b93d237b039ead8f12ba5f71
parent efa7c5a04f3b75c32d0d9c34764891b8088d44fe
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Thu, 28 Mar 2019 17:12:20 -0700

Ensure functions given right number of arguments

Diffstat:
tisp.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/tisp.c b/tisp.c @@ -664,6 +664,7 @@ tisp_eval(Env env, Val v) /* tail call into the function body with the extended env */ if (!(args = tisp_eval_list(env, args))) return NULL; + tsp_arg_num(args, car(v)->v.s, list_len(f->v.f.args)); if (!(hash_extend(env->h, f->v.f.args, args))) return NULL; hash_merge(env->h, f->v.f.env->h);