2024-10-31 (last edit: 2022-11-14)
Closures (Polish: "domknięcia") are anonymous functions that can access variables from the scope in which they were defined.
We'll go through the examples from Rust by Example.
In Rust, there is no hierarchy of types for collections (because there is no inheritance in general). Instead, what makes a collection is that it can be iterated over.
We'll go through the official docs. Most methods are defined in the Iterator trait.