|
|
|
|
|
by josephg
1063 days ago
|
|
Or Rust! Everything that implements the Iterator trait gets access to all of Iterator’s goodies, like map, filter, reduce, etc. Implementing iterator just requires adding a single next(&mut self) -> Option<Item> method on your type. Lifetimes and async are a massive pain in rust. But the trait system is a work of art. |
|