altos/lisp: Empty lambda body is not an error
authorKeith Packard <keithp@keithp.com>
Sat, 19 Nov 2016 05:15:33 +0000 (21:15 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 19 Nov 2016 05:15:33 +0000 (21:15 -0800)
It's not very exciting, but it's still legal

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lisp/ao_lisp_lambda.c

index 67ad24ee69296942dc0e8a240eee8c9d0e84ef66..b164cd66421056662fc72f301c6f81efe3bd8b11 100644 (file)
@@ -77,9 +77,6 @@ ao_lisp_lambda_alloc(struct ao_lisp_cons *code, int args)
        if (!lambda)
                return AO_LISP_NIL;
 
-       if (!code->cdr)
-               return ao_lisp_error(AO_LISP_INVALID, "missing parameters to lambda");
-
        if (!ao_lisp_check_argt(_ao_lisp_atom_lambda, code, 0, AO_LISP_CONS, 1))
                return AO_LISP_NIL;
        f = 0;