It could be argued that the following order is "more intuitive" since set/merge operations would have indexes that are true for the original array being modified.
Merge
Set
Insert
Delete
This way only the last delete instructions may be affected by previous inserts. The current way all instructions are affected since deletions are done first.
It could be argued that the following order is "more intuitive" since set/merge operations would have indexes that are true for the original array being modified.
This way only the last delete instructions may be affected by previous inserts. The current way all instructions are affected since deletions are done first.