Replace an item with another item.
the new item
the item to be replaced
whether replacing the item was successful