Allow the sed() replacement to be a function.