Iterabledefined as , not how , so this cannot work. typedefinterface
Just adding a function with a name iterator()to your class will help; you don’t need to implement or extend anything. This mechanism is called a structural subtype .
There is more information about iterators here .
source
share