Better sorting of index entries

svn: r8418

original commit: 5c13830bf67cab65630d41ac1da1552aedde769b
This commit is contained in:
Eli Barzilay 2008-01-25 16:47:43 +00:00
parent a65ca82cc5
commit 2dfa41a8f2

View File

@ -206,9 +206,12 @@
(cdr (apply append (map (lambda (i) (list ", " i)) l)))))
(define (cadr-string-lists<? a b)
(let loop ([a (cadr a)] [b (cadr b)])
(cond [(null? a) #t]
[(null? b) #f]
[(string-ci=? (car a) (car b)) (loop (cdr a) (cdr b))]
(cond [(null? b) #f]
[(null? a) #t]
[(string-ci=? (car a) (car b))
(or (loop (cdr a) (cdr b))
;; Try string<?
(string<? (car a) (car b)))]
[else (string-ci<? (car a) (car b))])))
(define alpha (string->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
(define contents