Re: Copy variable by value in a current-module.

2021-10-16 Thread Robert Kubosz
Thanks for quick answers, Jean and David! The function "ly:music-deep-copy" is the solution I was looking for :-) > module-ref and module-set! are useful for dealing with variables of which the name is not known in advance. Actually, in my case I don't know in advance the name of a variable which

Re: Copy variable by value in a current-module.

2021-10-16 Thread David Kastrup
Robert Kubosz writes: > I want to make a copy of a variable defined in a separate file, but run in > the same current-module. > The copy I make is a copy-by-reference, and in result any modifications I > apply to the copy also appear in the original. > How do I make a copy-by-value in a

Re: Copy variable by value in a current-module.

2021-10-16 Thread Jean Abou Samra
Le 16/10/2021 à 10:47, Robert Kubosz a écrit : I want to make a copy of a variable defined in a separate file, but run in the same current-module. The copy I make is a copy-by-reference, and in result any modifications I apply to the copy also appear in the original. How do I make a

Copy variable by value in a current-module.

2021-10-16 Thread Robert Kubosz
I want to make a copy of a variable defined in a separate file, but run in the same current-module. The copy I make is a copy-by-reference, and in result any modifications I apply to the copy also appear in the original. How do I make a copy-by-value in a current-module? More detailed example is