Idiomatic RustIterators, map, filter, collect
All courses

Zero-cost abstractions (mostly)

Iterator chains often compile to the same code as a hand-written loop — but read nicer. collect() materializes into a Vec.

Quirk: iter() borrows, into_iter() consumes, iter_mut() mutably borrows. Pick wrong and the borrow checker sends a strongly worded letter.

Output
Press Run to execute your code.