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

string>?

Conformance: R5RS Scheme

Purpose: Test whether a sequence of strings is in lexically descending order.

Arguments:
X - string
Y... - strings

Implementation:

(define string>?
  (letrec
    ((gt?
       (lambda (x y)
         (cond ((null? x) #f)
           ((null? y) #t)
           ((char<? (car x) (car y)) #f)
           ((char>? (car x) (car y)) #t)
           (else (gt? (cdr x) (cdr y)))))))
  (predicate-iterator
    (lambda (x y)
      (gt? (string->list x)
           (string->list y))))))

Example:

(string>? "xyz" "abc" "aaa") 
=> #t

See also:
string-ci>?, string<?, string=?, string<=?, string>=?, char>?, equal?.