Introduction to Internal Iteration and Lazy Evaluation
We'll cover the following...
Unlike the imperative style where external iterators are prominent (see Chapter 5, External Iteration and Argument Matching), in functional programming we use internal iterators. Internal iterators put iterations on autopilot; instead of focusing on iteration, you can keep your eyes on what to do for each element in a collection or a range. As well, internal iterators avoid explicit mutability ...