Hello,

once more I have to come up with two scheme problems. I attached small examples.

1) Why can’t ‘apply’ be used with ‘and’ (defined-all.ly example file)?
2) Why does assoc-get return #f instead of a list in the second example file?

Help is much appreciated.

Yours, Simon
\version "2.19.17"

#(define (defined-all? . l)
   (let ((l (map defined? l)))
     (apply and l)))
sc = foo
ac = bar
% ‘Wrong type argument in position 1: #<primitive-builtin-macro! and>’
#(display (defined-all? 'sc 'ac))
\version "2.19.17"

% would be placed in the actual music file
clef-set = low

#(define high-clefs '("G" "mezzosoprano" "C" "varbaritone"))
#(define low-clefs '("soprano" "C" "tenor" "F"))
#(define modern-clefs '("G" "G" "G_8" "F"))
#(define clef-set-alist `((high . ,high-clefs)
                    (low . ,low-clefs)
                    (modern . ,modern-clefs)))

% test a bit from define-scheme-function
#(display (assoc-get clef-set clef-set-alist))
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to