lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme-question about accumulating lists of lists


From: Malte Meyn
Subject: Re: scheme-question about accumulating lists of lists
Date: Fri, 19 Apr 2019 17:10:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1



Am 19.04.19 um 16:35 schrieb Thomas Morley:
I could do
(cons '(a b c) (list (car (list-pair)) (cdr (list-pair))))
and to get the last list: (last ...)
Looksy clumsy, though.

Any better method?

I’m not sure what you want to do here. But maybe it would be easier to convert the pair of lists to a lists of lists first?

\version "2.21.0"

#(begin
  (define (list-pair->list-list the-list-pair)
    (list (car the-list-pair) (cdr the-list-pair)))
  (define foo '((a b c) . (d e f)))
  (display foo)
  (newline)
  (display (list-pair->list-list foo)))



reply via email to

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