I am building a custom data structure which supposes to return an iterator for its elements. If simplified, it can look like this: