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


Comparing two numbers: `gtp'

This abstraction tests whether the first of two numbers is greater than the second.


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


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


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