A wrapper for utils::modifyList() that attempts to coerce non-lists to lists before updating.
utils::modifyList()
update_list(old, new)
x
a list to be updated
val
stuff to update x with
Returns an updated list.