Added generator example for practice.