Converting to for_each iterator.