How does one tell if something is a function?



> Nevermind, found mfboundp.

mfboundp is not quite the right function here.  mfboundp determines
whether a symbol is defined as a Maxima function; it does not
determine whether an object can be called by mfuncall.  In particular:

It doesn't recognize a function defined in Lisp, a Lisp lambda
expression, or a Maxima lambda expression:

     (mfboundp 'cons) => nil
     (mfboundp '(lambda (x) x)) => fatal error (!!)
     (mfboundp '((lambda) ((mlist) x) x) ) => fatal error (!!)

even though mfuncall has no problems with these useful cases:

     (mfuncall 'cons 2 3) => (2 . 3)
     (mfuncall '((lambda simp) ((mlist) x) x) 34) => 34