List

keystore/4

keystore(list, key, index, new_tuple)

Receives a list of tuples and replaces the element identified by key at position with new_tuple.

If the element does not exist, it is added to the end of the list.