next up previous contents index
Next: Multiplying two numbers: mult Up: Arithmetic Operations Previous: Adding two numbers: add   Contents   Index


succ


\begin{lstlisting}[language=Scm,stepnumber=2]{}
(define succ (lambda (n)
(lambda (f)
(compose f (n f)))))
\end{lstlisting}
This abstraction returns the successor of a certain number which means it adds the value 1 to it.


domain access counter Georg P. Loczewski 2004-03-05