CollectionX ->begin (Iterator) CollectionY ->begin (Iterator) CollectionZ ->begin (Iterator) ->end (Iterator) ProgressBar Flowers Algorithms - showProgress - Bound to ProgressBar - growFlowers - Bound to Flowers code: ... use CollectionX ; use CollectionY ; use Algorithms qw( showProgress, growFlowers ) ; ... my colX = new CollectionX ; colX->... ; while( showProgress(CollectionX->begin) ) { } my colY = CollectionY ; colY->... ; while( showProgress(colY->begin) ) { } my colY = CollectionY ; colY->... ; while( growFlowers(colY->begin) ) { }