in reply to Re^7: Re-orderable keyed access structure?
in thread Re-orderable keyed access structure?
The objection is that it doesn't do what I need it to. Taking an element from the middle of the stack and moving it to the top or the bottom.
push @array, splice @array, $itemToMove, 1;
Doing this using swap_elements_by_idx() would require iterating over the length of both @actual_data and @key_for arrays. Either of the working schemes is better than this as they only iterate one structure not two.
|
|---|