pub fn iterator_exercise() -> Result<(), String>
Expand description

Example of using the “Iterator” design pattern.

A custom container is instantiated (it already contains hard-coded data to iterate over). The custom container can then deliver three iterators, each providing a different aspect of the hard-coded data.

The output shows the output from each iterator.