\HeaderA{is.function}{Is an Object of Type (Primitive) Function?}{is.function}
\aliasA{is.primitive}{is.function}{is.primitive}
\keyword{programming}{is.function}
\begin{Description}\relax
Checks whether its argument is a (primitive) function.
\end{Description}
\begin{Usage}
\begin{verbatim}
is.function(x)
is.primitive(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an \R{} object.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{is.function} is generic: you can write methods to handle
specific classes of objects, see \LinkA{InternalMethods}{InternalMethods}.

\code{is.primitive(x)} tests if \code{x} is a primitive function
(either a \code{"builtin"} or \code{"special"} as from \code{\LinkA{typeof}{typeof}})?
\end{Details}
\begin{Value}
\code{TRUE} if \code{x} is a (primitive) function, and \code{FALSE}
otherwise.
\end{Value}
\begin{Examples}
\begin{ExampleCode}
is.function(1) # FALSE
is.function(is.primitive)  # TRUE: it is a function, but ..
is.primitive(is.primitive) # FALSE:it's not a primitive one, whereas
is.primitive(is.function)  # TRUE: that one *is*
\end{ExampleCode}
\end{Examples}

