Changed iterator fn interface to accept isLastIteration flag (disambiguates from collections containing undefined)
Corrected the name of isFinished flag in tests to reflect its real nature