next up previous contents index
Next: Examples for recursion Up: Relational Abstractions Previous: Comparing two numbers: `ltp'   Contents   Index


Comparing two numbers: `gep'

This abstractions tests whether the first of two numbers is greater than or equal to the second.


\begin{lstlisting}[language=Scm]{}
(define gep (lambda (m n)
(zerop (sub n m))))
\end{lstlisting}


\begin{lstlisting}[language=Scm]{}
(bdisp! (gep two three))
--> false
(bdisp! (gep three two))
--> true
(bdisp! (gep two two))
--> true
\end{lstlisting}


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