Here are 2 versions of the same procedure.
Is the second one *too* concise and cryptic?
- Mark

(define (ly:string-compare a b ci)
  (let ((mismatch (first-diff-chars a b ci)))
    (if mismatch
        (if (car mismatch)
            (if (cdr mismatch)
                ((if ci ly:char-ci<? ly:char<?)
                   (car mismatch) (cdr mismatch))
                #f)
            (if (cdr mismatch) #t #f))
      #f)))


(define (ly:string-compare a b ci)
  (let ((mismatch (first-diff-chars a b ci)))
    (cond ((and mismatch (car mismatch) (cdr mismatch))
             ((if ci ly:char-ci<? ly:char<?)
                   (car mismatch) (cdr mismatch)))
          ((and mismatch (cdr mismatch)) #t)
          (else #f))))



      


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to