Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
s.insert (s.begin () + i, x);
s.insert(i, x);
List.insert_at(s, i, x)
{Left, Right} = lists:split(I-1, S),
Left ++ [X|Right].
integer, dimension(:), allocatable :: s
s = [s(1:i-1), x, s(i:)]
s = append(s, 0)
copy(s[i+1:], s[i:])
s[i] = x
take i s ++ x : drop i s
s.splice(i, 0, x);
s.add(i, x)
(defun ins (lst x i)
(if (zerop i) (cons x lst)
(cons (car lst) (ins (cdr lst) x (- i 1)))))
(setf s (ins s x i))
table.insert(s,i,x)
array_splice($s, $i, 0, $x);
splice(@s, $i, 0, $x);
s.insert(i, x)
s.insert(i, x)
s.insert(i, x);
s.Insert(i,x)