]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3177: Remove lily-and and lily-or
authorDavid Kastrup <dak@gnu.org>
Thu, 14 Feb 2013 15:32:30 +0000 (16:32 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 19 Feb 2013 21:56:37 +0000 (22:56 +0100)
They are named cryptically, duplicate functional-or and
functional-and, and the only caller only-if-beamed can be written much
more simply.

The rewrite stops when encountering the first object with beam in
side-support-elements: that's arguably non-equivalent but more
efficient.

scm/lily-library.scm
scm/output-lib.scm

index 00f91e3116a2d436cab548e2839972bb838ebcff..c6b8dd2a9ea3378e2794aa6931a9a2efd82ba38e 100644 (file)
@@ -696,15 +696,6 @@ right (@var{dir}=+1)."
 (define-public (reverse-interval iv)
   (cons (cdr iv) (car iv)))
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; boolean
-
-(define (lily-and a b)
-  (and a b))
-
-(define (lily-or a b)
-  (or a b))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; coordinates
 
index bcb65588a4f576e89aafe33019940f3e4b998fa8..641ca7ce50abaf01162bd5881507b9229a8e3078 100644 (file)
 ;; side-position stuff
 
 (define-public (only-if-beamed g)
-  (reduce lily-or
-          #f
-          (map (lambda (x)
-                 (ly:grob? (ly:grob-object x 'beam)))
-               (ly:grob-array->list (ly:grob-object g
-                                                    'side-support-elements)))))
+  (any (lambda (x) (ly:grob? (ly:grob-object x 'beam)))
+       (ly:grob-array->list (ly:grob-object g 'side-support-elements))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; note heads