A swapElements command for cubescript that returns a modified list that swaps the positions of 2 elements.
Pseudo-code:
[cubescript]testList = [0 1 2 3 4 5]
echo (swapElements $testList 2 4) // output: 0 1 4 3 2 5[/cubescript]
Currently possible but kludgy with custom cubescript. Having a hardcoded function for it would IMHO be a better option for large scripts that need to use it often.
Pseudo-code:
[cubescript]testList = [0 1 2 3 4 5]
echo (swapElements $testList 2 4) // output: 0 1 4 3 2 5[/cubescript]
Currently possible but kludgy with custom cubescript. Having a hardcoded function for it would IMHO be a better option for large scripts that need to use it often.