Logo

Programming-Idioms

History of Idiom 44 > diff from v40 to v41

Edit summary for version 41 by programming-idioms.org:
Admin deletes impl 3712: Incorrect. See impl 372 (splice) instead.

Version 40

2020-07-05, 20:27:44

Version 41

2021-05-25, 11:47:29

Idiom #44 Insert element in list

Insert element x at position i in list s. Further elements must be shifted to the right.

Idiom #44 Insert element in list

Insert element x at position i in list s. Further elements must be shifted to the right.

Inserting the element x at a given position in the list s
Variables
x,i,s
Variables
x,i,s
Code
s.aplice(i,0,x)