Write a function that reverses a generator.

Technical