[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: functionp

In article <9211051555.AA17957@cambridge.apple.com> bill@cambridge.apple.com (Bill St. Clair) writes:

   >When you have a function defined, say (defun junk (x) ... ),
   >and you try:
   >(functionp 'junk)
   >you get NIL.
   >Is this not a bug? 

   At the bottom of p. 102 of CLtL2, it says:

   "X3J13 voted in June 1988 <90> to define

   (functionp x) = (typep x 'function)

   Because the vote also specified that types CONS and SYMBOL are disjoint
   from type FUNCTION, this is an incompatible change; now FUNCTIONP is in
   fact always false of symbols and lists."

This damned issue just won't go away!  In CLTL-1 Lisps, users are
always complaining that FUNCTIONP on any symbol returns T.  In
CLTL-2/ANSI Lisps people get confused the other way.  In CLIM we wrote
a thing called FUNCALLABLE-P, which returned T if the thing was a
function or a symbol with a function in the function cell (I don't
think we checked for a lambda-expression, but we probably should