Le dim. 2 juill. 2023, à 15 h 28, Valentin Petzel <valen...@petzel.at> a écrit :

> you should not use for-each in such a case. for-each is essentially a version
> of map that does not return anything.
> …the @ token to tell the parser to insert not the scheme
> object in question, but all the elements of it:

(studiously taking notes in this scheme 101 course)

> The other way would be to construct the SimultaneousMusic << ... >> directly
> in scheme:
>     $(make-music 'SimultaneousMusic 'elements parts)

Thanks for the explanation Valentin. I really appreciate it.


Jean Abou Samra <j...@abou-samra.fr> writes:
> You can't — for-each is not the right tool for this. What you actually want 
> is called list splicing: #@

Thanks a lot Jean. This is exactly what I needed.


David Kastrup <d...@gnu.org> a écrit :
> That has an awkward look.  I'd rather use

Yes, sorry for that, I tried to MWEise my very awkward and barely
functioning part system.

>  #@(ly:music-property parts 'elements)

^ Thanks, I'll keep this one in my tool box.



-- 
Pierre-Luc Gauthier

Reply via email to