Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Closures and Iterators

This chapter teaches closures and iterators. These features combine many of the language capabilities covered earlier and are among the more advanced, harder-to-grasp topics — which is why they come after Chapter 5. Even so, they’re extremely common in real-world Rust code, so if you want to read genuine Rust, understanding closures and iterators is a must.