+1 for implementing the iterator protocol.