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/
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to