From 6ad23a8dfac3d898233db6a7476dc0a3228583f4 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 14 Feb 2013 16:32:30 +0100 Subject: [PATCH] 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. --- scm/lily-library.scm | 9 --------- scm/output-lib.scm | 8 ++------ 2 files changed, 2 insertions(+), 15 deletions(-) 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 -- 2.39.2