setModification function

Return a copy of the table with the given modification function added