diff --git a/src/lisp/s-expr.pla b/src/lisp/s-expr.pla index f4c929f..d52fc53 100644 --- a/src/lisp/s-expr.pla +++ b/src/lisp/s-expr.pla @@ -908,6 +908,11 @@ export def eval_expr(expr)#1 else curl = NULL // Set-up for in-line LAMBDA fin + if !expr_car // Make sure we don't hang + puts("Invalid function:"); print_expr(expr); putln + expr = NULL + break + fin if expr_car->type == CONS_TYPE if expr_car=>car == sym_funarg // FUNARG expr = eval_funarg(expr_car, expr=>cdr) @@ -919,6 +924,10 @@ export def eval_expr(expr)#1 fin if expr_car=>car == sym_lambda // LAMBDA curl, expr = apply_args(curl, expr_car, expr=>cdr) + else + puts("LAMBDA expected:"); print_expr(expr); putln + expr = NULL + break fin fin else