def map_operator(operator, iterable):
    return (operator(item) for item in iterable)

def main():
    vals = reader()
for op in operators:
    vals = map_operator(op, vals)
return vals
Python Generator "chain" in a for loop