Add listB to listA - and after changing listB => listA also changes?

Is this supposed to happen?

At first - before the pause, listA looks normal and as to be expected.

But than, changing listB also affects listA ??

So setting I understand that we create a pointer. That’s why we use id_of to make a real copy. I hadn’t expected the same to happen with adding.

I can code around it, no problem.

Thx

I hadn’t expected the same to happen with adding.

It has nothing to do with setting or adding. LISTA has LISTB as an item, the actual LISTB. That’s true no matter how you use those lists later.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.