lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Axis_group_engraver + Scheme engraver for staff combining (issue 576


From: thomasmorley65
Subject: Re: Axis_group_engraver + Scheme engraver for staff combining (issue 576540043 by address@hidden)
Date: Mon, 18 Mar 2019 14:49:27 -0700

On 2019/03/17 01:45:49, saul.james.tobin wrote:

Re cdr is not a predicate — the list being processed here is composed
of
pairs, the cdr of which is ##t or ##f.

The description is still confusing. Do you mean something like below?

#(define (divide-true-cdr ls)
"Split @var{ls} into those elements which do and don't have a tail of
value
@code{#t}"
 (call-with-values
   (lambda () (partition (lambda (x) (eq? #t (cdr x))) ls))
   (lambda (a b) (list a b))))

#(display (divide-true-cdr '((1 . #f) (2 . #t) (3 . #f))))

=> (((2 . #t)) ((1 . #f) (3 . #f)))


One question — is there a preferred way to get child contexts in
Scheme?
Can't seem to find such a thing in the documentation but maybe I'm
missing
something.

We have AnnounceNewContext which may help.
For an usage-example see:
https://lists.gnu.org/archive/html/bug-lilypond/2019-03/msg00011.html




https://codereview.appspot.com/576540043/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]