@@ -1101,7 +1101,7 @@ int intpower (int base, int exp) {
11011101 testargument - handles the :test argument for functions that accept it
11021102*/
11031103object* testargument (object* args) {
1104- object* test = bsymbol (EQ);
1104+ object* test = bfunction_from_symbol ( bsymbol (EQ) );
11051105 if (args != NULL ) {
11061106 if (cdr (args) == NULL ) error (" dangling keyword" , first (args));
11071107 if (isbuiltin (first (args), TEST)) test = second (args);
@@ -1795,7 +1795,8 @@ object* closure (bool tc, symbol_t name, object* function, object* args, object*
17951795}
17961796
17971797object* apply (object* function, object* args, object* env) {
1798- if (symbolp (function)) {
1798+ if (symbolp (function)) error (" can't call a symbol" , function);
1799+ if (bfunctionp (function)) {
17991800 builtin_t fname = builtin (function->name );
18001801 if ((fname < ENDFUNCTIONS) && (fntype (getminmax (fname)) == FUNCTIONS)) {
18011802 Context = fname;
@@ -7001,8 +7002,8 @@ const tbl_entry_t BuiltinTable[] = {
70017002 { stringcopylist, fn_copylist, MINMAX (FUNCTIONS, 1 , 1 ), doccopylist },
70027003 { string86, fn_makearray, MINMAX (FUNCTIONS, 1 , 5 ), doc86 },
70037004 { string87, fn_reverse, MINMAX (FUNCTIONS, 1 , 1 ), doc87 },
7004- { string88, fn_assoc, MINMAX (FUNCTIONS, 2 , 2 ), doc88 },
7005- { string89, fn_member, MINMAX (FUNCTIONS, 2 , 2 ), doc89 },
7005+ { string88, fn_assoc, MINMAX (FUNCTIONS, 2 , 4 ), doc88 },
7006+ { string89, fn_member, MINMAX (FUNCTIONS, 2 , 4 ), doc89 },
70067007 { string90, fn_apply, MINMAX (FUNCTIONS, 2 , UNLIMITED), doc90 },
70077008 { string91, fn_funcall, MINMAX (FUNCTIONS, 1 , UNLIMITED), doc91 },
70087009 { string93, fn_mapc, MINMAX (FUNCTIONS, 2 , UNLIMITED), doc93 },
0 commit comments