Demonstration of Iterator Pattern