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