SketchyLISP Reference |
Copyright (C) 2007 Nils M Holm |
<<[string>?] | [Index] | [substitute]>> |
Conformance: R5RS Scheme
Purpose: Test whether a sequence of strings is in lexically non-ascending order.
Arguments:
X - string
Y... - strings
Implementation:
(define string>=? (letrec ((ge? (lambda (x y) (cond ((null? x) (null? y)) ((null? y) #t) ((char<? (car x) (car y)) #f) ((char>? (car x) (car y)) #t) (else (ge? (cdr x) (cdr y))))))) (predicate-iterator (lambda (x y) (ge? (string->list x) (string->list y))))))
Example:
(string>=? "xyz" "xyz" "xxx") => #t
See also:
string-ci>=?,
string<?,
string=?,
string>?,
string<=?,
char>=?,
equal?.
<<[string>?] | [Index] | [substitute]>> |