Am 31.12.18 um 09:58 schrieb Andrew Bernard:

Why do you have to use cadr and not cdr on the ly:grob-set-property line? Isn't the broken part the second item in a list of two items? How to understand this?

In Scheme, a list is a pair, containing the head/car (first element of the list) and tail/cdr (sublist of all other elements). A list containing only one element is a pair of that element and an empty list '().

'(1 2 3 4 5)
is the same as
'(1 . (2 . (3 . (4 . (5 . ()))))

So the car of the list above is 1, the cdr is '(2 3 4 5). If you want to get the 2, you have to take the car of '(2 3 4 5). And cadr is short for “car of cdr”.

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to