📅  最后修改于: 2022-03-11 15:00:12.205000             🧑  作者: Mango
\dicumentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[language=R]
fib <- function(n) {
if (n < 2)
n
else
fib(n - 1) + fib(n - 2)
}
fib(10) # => 55
\end{lstlisting}
\end{document}