t3x.org / sketchy / library / greater.html
SketchyLISP
Reference
  Copyright (C) 2007
Nils M Holm

>

Conformance: R5RS Scheme

Purpose: Check whether a sequence of numbers is in strict descending order. Return #t, if a>b>... and otherwise #f.

Arguments:
A - number
B... - numbers

Implementation:

(define (> a . b)
  (letrec
    ((gt
       (lambda (a b)
         (cond ((eq? a #t) #t)
           ((< b a) b)
           (else #t)))))
    (cond ((null? b)
        (bottom '(too few arguments to >)))
      (else (neq? (fold-left gt a b) #t)))))

Example:

(> 7 5 3) 
=> #t

See also:
digits, <, <=, >=, n>.