Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Rustlings iterators2: Introducing Iterators by manually calling .next and using .iter()


    README for this exercise.

    input.chars() returns an iterator that we manually iterate through using .next().

    Later in the program we take advantage of .iter() and the turbofish to reuse the same code across two different use cases.

    Also note that an alternative solution is possible where the character uppercase function returns an iterator that is then collected()