Convert simple generator to enumerator.