]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily-library.scm
Merge with master
[lilypond.git] / scm / lily-library.scm
index 70faac6a82b97e462f79a531f33e281f38cbd2b6..e6215b98235349e4f95f50b6799cd212869d0eee 100644 (file)
   (string<? (symbol->string (car x))
            (symbol->string (car y))))
 
-(define-public (chain-assoc x alist-list)
-  (if (null? alist-list)
-      #f
-      (let* ((handle (assoc x (car alist-list))))
-       (if (pair? handle)
-           handle
-           (chain-assoc x (cdr alist-list))))))
-
 (define-public (chain-assoc-get x alist-list . default)
   "Return ALIST entry for X. Return DEFAULT (optional, else #f) if not
 found."
@@ -380,6 +372,9 @@ found."
 
 (define-public interval-end cdr)
 
+(define-public (interval-bound interval dir)
+  ((if (= dir RIGHT) cdr car) interval))
+
 (define-public (interval-index interval dir)
   "Interpolate INTERVAL between between left (DIR=-1) and right (DIR=+1)"
   
@@ -441,9 +436,6 @@ found."
          (make-string 1 (integer->char (+ 65 (modulo i 26))))
          (string-encode-integer (quotient i 26))))))
 
-(define-public (ly:numbers->string lst)
-  (string-join (map ly:number->string lst) " "))
-
 (define (number->octal-string x)
   (let* ((n (inexact->exact x))
          (n64 (quotient n 64))
@@ -523,13 +515,9 @@ possibly turned off."
       0
       (if (< x 0) -1 1)))
 
-(define-public (round2 num)
-  (/ (round (* 100 num)) 100))
-
-(define-public (round4 num)
-  (/ (round (* 10000 num)) 10000))
 
-(define-public (car< a b) (< (car a) (car b)))
+(define-public (car< a b)
+  (< (car a) (car b)))
 
 (define-public (symbol<? lst r)
   (string<? (symbol->string lst) (symbol->string r)))