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: Thomas Morley
Subject: Re: scheme-question about accumulating lists of lists
Date: Fri, 19 Apr 2019 17:28:10 +0200

Am Fr., 19. Apr. 2019 um 17:09 Uhr schrieb Malte Meyn <address@hidden>:
>
>
>
> 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?

I want to run procedures over constructed lists of lists, while the
initial first entry is a pair.
Failing example:
(map
  car
  (cons '(a b c) (cons '(1 2 3) '(x y z))))

One way to make it work is to convert the initial pair (cons '(1 2 3)
'(x y z)) to a list of lists, i.e (cons '(1 2 3) (list '(x y z)))
The question is: is it the only and/or best way?

Thanks,
  Harm



reply via email to

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