How to replace an item that’s in a list that’s in a list

Basically, I have a list that looks like
image
This doesn't work for some reason. This does not mutilate the original list.
image
For clarity, changing root to 1 doesn't do anything either

That's because a list returned from getting an item by key instead of number, does not result in a linked list, it's a brand new list with all the items but the first one. I think if you're trying to do something like this, it might be best to use the untitled script pic (1) block, since that just returns the item without doing anything else (which does mean that the first item is the key).

I did try to use (all but first of @list) since that's supposed to be a linked list, which means that you should be able to modify it and the original list gets updated, but it that doesn't seem to be the case (and modifying the original list doesn't update the all but first of list) (@bh, am I correct with how (all but first of @list) should behave?).

??? WDYM?

untitled script pic - 2024-12-30T230240.481
also
untitled script pic - 2024-12-30T230440.386

It seems to be working as expected ...


@ OP, dictionary may be defined as

I was testing it with the way the @mr_owlssssnap2 showed, something like this.

Rather than the value being its own list.

honestly I was just gonna make a file system but I instead opted for a modified version of @joecooldoo's

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