Invoke a function for each element in a collection and update the collection in-place, iterating from right to left.