\HeaderA{Recall}{Recursive Calling}{Recall}
\keyword{programming}{Recall}
\begin{Description}\relax
\code{Recall} is used as a placeholder for the name of the function
in which it is called.  It allows the definition of recursive
functions which still work after being renamed, see example below.
\end{Description}
\begin{Usage}
\begin{verbatim}
Recall(...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] all the arguments to be passed.
\end{ldescription}
\end{Arguments}
\begin{Note}\relax
\code{Recall} will not work correctly when passed as a function
argument, e.g. to the \code{apply} family of functions.
\end{Note}
\begin{SeeAlso}\relax
\code{\LinkA{do.call}{do.call}} and \code{\LinkA{call}{call}}.

\code{\LinkA{local}{local}} for another way to write anonymous recursive functions.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## A trivial (but inefficient!) example:
fib <- function(n)
   if(n<=2) { if(n>=0) 1 else 0 } else Recall(n-1) + Recall(n-2)
fibonacci <- fib; rm(fib)
## renaming wouldn't work without Recall
fibonacci(10) # 55
\end{ExampleCode}
\end{Examples}

