Brain Unrolling: Generators and the Sweet Syntactic Sugar of Coroutines
videocortex.io
videocortex.io
Fun tidbit about Rust: in Rust, using iterators is actually faster than normal loops because the compiler can elide (infer and remove? not entirely sure how to define elude), most of the bounds checking.
I'd assume it also gets optimized out in heavily optimized interpreters, like the JVM.