Kernel

put_elem/3

put_elem(tuple, index, value)

Puts value at the given zero-based index in tuple.