Open ornamentist opened 3 months ago
Is there a recommended way to insert multiple elements at a position in a pvector? The equivalent of the following Python list code:
pvector
>>> xs = [1, 2, 6, 7] >>> xs[2:2] = [3, 4, 5] >>> xs [1, 2, 3, 4, 5, 6, 7]
I can see I could join three pvectors if necessary: a prefix vector, the inserted elements and a suffix vector but I figure there's probably a better way?
Is there a recommended way to insert multiple elements at a position in a
pvector
? The equivalent of the following Python list code:I can see I could join three pvectors if necessary: a prefix vector, the inserted elements and a suffix vector but I figure there's probably a better way?