def foo(input_array):

    def gen():
        for x in input_array:
            yield processed(x)
return list(gen())
Is there a library function in Python to turn a generator-function into a function returning a list?