|
From: | Boris Shingarov |
Subject: | Simplification of live-elements-list, why not? |
Date: | Sun, 14 Nov 2010 20:19:17 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 |
In scm/output-lib.scm, the (internally used) function live-elements-list
is defined like this: (define (live-elements-list me) (let* ((elements (ly:grob-object me 'elements)) (elts-length (ly:grob-array-length elements)) (live-elements '())) (let get-live ((len elts-length)) (if (> len 0) (let ((elt (ly:grob-array-ref elements (1- len)))) (if (grob::is-live? elt) (set! live-elements (cons elt live-elements))) (get-live (1- len))))) live-elements)) Any specific reason why not just filter on the is-live? predicate? Also, is there a real difference between grob::is-live? and ly:is-live? predicates? (I would be inclined to get rid of grob::is-live? version...) |
[Prev in Thread] | Current Thread | [Next in Thread] |