On Sun, Nov 14, 2010 at 5:19 PM, Boris Shingarov <b...@shingarov.com> wrote:

>  In scm/output-lib.scm, the (internally used) function live-elements-listis 
> 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?
>

Doesn't filter just work on plain scheme lists? elements is a grob-array
object. Of course, if filter doesn't work on such objects it might be better
to write a version of filter rather than replicating it many times.


> 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...)
>

I couldn't find ly:is-live? ...

Joe
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to