Allow calling lambdas directly

This commit is contained in:
2026-01-29 00:15:18 -08:00
parent a469e137b4
commit a64051403a
2 changed files with 3 additions and 2 deletions

View File

@ -477,6 +477,8 @@ DEFUN(funcall, "funcall", (LispVal * func, LispVal *args), "(func &rest args)",
LispFunction *fobj = func;
if (SYMBOLP(func)) {
fobj = Fsymbol_function(func, Qt);
} else if (CONSP(func) && EQ(XCAR(func), Qlambda)) {
fobj = Feval(func, TOP_LEXENV());
}
// include symbol here for the error message
CHECK_TYPE(fobj, TYPE_FUNCTION, TYPE_SYMBOL);