Create an iterator which invokes a function for each iterated value before returning the iterated value.