if special form requires exactly 3 args

This commit is contained in:
Sami Samhuri 2011-04-22 12:45:28 -07:00
parent 9161ca8c5d
commit 7eb66463b0

View file

@ -148,7 +148,7 @@ static LakeVal *_lambda(Env *env, LakeList *expr)
static LakeVal *_if(Env *env, LakeList *expr)
{
if (LIST_N(expr) < 3) {
if (LIST_N(expr) != 3) {
invalid_special_form(expr, "if requires 3 parameters");
return NULL;
}