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.
(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
;; 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