Best way to replace slice mutation

Creating a copy of a node with different marks is done with node.mark. Updating the content of a slice can be done by creating a new slice with an updated fragment.