Implement generator.