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


Comparing two numbers: `ltp'

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


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


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


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