lilypond-user
[Top][All Lists]
Advanced

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

Re: Flat flared hairpins


From: Malte Meyn
Subject: Re: Flat flared hairpins
Date: Mon, 31 Dec 2018 10:43:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0



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



reply via email to

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