Iterators
Iterators are how Rust does loops without writing loops — a chain of composable adapters (map, filter, collect) that reads like a description of what you want, not how to get it. And the astonishing part is that this high-level, functional style compiles to code as fast as a hand-written loop. Zero-cost abstraction, at its most delightful.
Iterators are how Rust does loops without writing loops — a chain of composable adapters (map, filter, collect) that reads like a description of what you want. And the astonishing part is that this high-level style compiles to code as fast as a hand-written loop.