fboundp
fboundp name → generalized-boolean
[ˌefˈba.undpē]
name—a function name.
generalized-boolean—a generalized boolean.
7.1.1 20Returns true if name is fbound; otherwise, returns false.
Some "implementation dependent" => "true" per Moore #2 (first public review). -kmp 12-May-93
(fboundp 'car) → true
(fboundp 'nth-value) → false
(fboundp 'with-open-file) → true
(fboundp 'unwind-protect) → true
(defun my-function (x) x) → MY-FUNCTION
(fboundp 'my-function) → true
(let ((saved-definition (symbol-function 'my-function)))
(unwind-protect (progn (fmakunbound 'my-function)
(fboundp 'my-function))
(setf (symbol-function 'my-function) saved-definition)))
→ false
(fboundp 'my-function) → true
(defmacro my-macro (x) `',x) → MY-MACRO
(fboundp 'my-macro) → true
(fmakunbound 'my-function) → MY-FUNCTION
(fboundp 'my-function) → false
(flet ((my-function (x) x))
(fboundp 'my-function)) → false
None.
None.
Should signal an error of type type-error if name is not a function name.
symbol-function, fmakunbound, fdefinition
It is permissible to call symbol-function on any symbol that is fbound.
fboundp is sometimes used to “guard” an access to the function cell, as in:
(if (fboundp x) (symbol-function x))
Defining a setf expander F does not cause the setf function (setf F) to become defined. Moon wanted this removed because he thinks it is "redundant and pompous". -kmp 4-Dec-91
as such, if there is such a definition
of a \term{setf expander} \param{F}, the \term{function} \f{(setf \param{F})}
can be \term{fbound} if and only if, by design or coincidence, a
function binding for \f{(setf \param{F})} has been independently established.