Itreator is a behavorial desing pattern that let's you traverse elements of a collection without exposing it's underlying representation (list, stack, tree etc.)
The main idea of the iterator pattern is to extract the traversal behaviour of a collection into a separate object called the iterator