< Back to IRCAM Forum

Intern function

Hi all!

I try to convert a (“a” “b”) into a (A B) list.
I use the mapcar with the function intern in lamda mode but I get as a result (/a /b).
Is there any other solution? What do I do wrong?

Is there any other way to create from a numeric series (0 1 2 3 4 5) a (A B C D E) list?

Thank you a lot in advance,

Dimitris

Dear dandriko,

I take the liberty of answering, hoping to have understood your request. Attached there is the patch and the screen.

Basically, to convert a list of strings, just connect it to the second input of TEXTFILE or to the input of TEXT-BOX to obtain a list of non-strings in output.

Regarding the second part of the question: given a numerical series, it is possible to associate a series of letters and maintain this mapping even in the case of permutation of the original numerical series in input (so 0 will always correspond to A, 1 to B, etc.).

I await corrections to my hypothesis and thank you again for the interesting topic (I did not know the INTERN function, what is it used for?).

Best regards,

neo

string2listxmapping.omp (10.8 KB)

1 Like

Hey,

Here more ideas:

image

best
rc

1 Like

Dear Dandriko,

Looks like you had lovely answers here.
However, your question is rather vague.
you have three different types here, strings, characters and symbols, like:
(“a” “b”) is a list of two strings
(#\a #\b) a list of characters
(A B) is a list of symbols

Each type has different proprieties. So maybe you should specify more.
Here is a very interesting page about all this and might help you:

Best
K

1 Like

Thank you all!

Great responses!!

Dimitris

1 Like