Implement enumerator generation.