Implement iterator.