next up previous contents index
Next: Arithmetic Operations Up: Natural Numbers Previous: three   Contents   Index


zerop


\begin{lstlisting}[language=Scm,stepnumber=2]{}
(define zerop (lambda (n)
((n (lambda(y)
false))
true)))
\end{lstlisting}
This abstraction is used to check, whether a number is equal to 0. `true' or `false' is returned respectively. Readers are referred back to our `apples example' as a help to understand the code of this abstraction.


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