Implementing $yield functionality to iterator and iterator-next; updating tests