@@ -1101,7 +1101,7 @@ int intpower (int base, int exp) {
1101
1101
testargument - handles the :test argument for functions that accept it
1102
1102
*/
1103
1103
object* testargument (object* args) {
1104
- object* test = bsymbol (EQ);
1104
+ object* test = bfunction_from_symbol ( bsymbol (EQ) );
1105
1105
if (args != NULL ) {
1106
1106
if (cdr (args) == NULL ) error (" dangling keyword" , first (args));
1107
1107
if (isbuiltin (first (args), TEST)) test = second (args);
@@ -1795,7 +1795,8 @@ object* closure (bool tc, symbol_t name, object* function, object* args, object*
1795
1795
}
1796
1796
1797
1797
object* 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)) {
1799
1800
builtin_t fname = builtin (function->name );
1800
1801
if ((fname < ENDFUNCTIONS) && (fntype (getminmax (fname)) == FUNCTIONS)) {
1801
1802
Context = fname;
@@ -7001,8 +7002,8 @@ const tbl_entry_t BuiltinTable[] = {
7001
7002
{ stringcopylist, fn_copylist, MINMAX (FUNCTIONS, 1 , 1 ), doccopylist },
7002
7003
{ string86, fn_makearray, MINMAX (FUNCTIONS, 1 , 5 ), doc86 },
7003
7004
{ 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 },
7006
7007
{ string90, fn_apply, MINMAX (FUNCTIONS, 2 , UNLIMITED), doc90 },
7007
7008
{ string91, fn_funcall, MINMAX (FUNCTIONS, 1 , UNLIMITED), doc91 },
7008
7009
{ string93, fn_mapc, MINMAX (FUNCTIONS, 2 , UNLIMITED), doc93 },
0 commit comments