From: David Kastrup Date: Thu, 14 Feb 2013 15:32:30 +0000 (+0100) Subject: Issue 3177: Remove lily-and and lily-or X-Git-Tag: release/2.17.13-1~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6ad23a8dfac3d898233db6a7476dc0a3228583f4;p=lilypond.git Issue 3177: Remove lily-and and lily-or 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. --- diff --git a/scm/lily-library.scm b/scm/lily-library.scm index 00f91e3116..c6b8dd2a9e 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -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 diff --git a/scm/output-lib.scm b/scm/output-lib.scm index bcb65588a4..641ca7ce50 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -188,12 +188,8 @@ ;; 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