Closed Nahor closed 4 months ago
On one hand, nested iterators are somewhat common (container of containers, iterator of containers, container of iterators), so introducing flatten could be useful.
flatten
On the other hand, flatten, flat_map, etc. are not mentioned in the Rust book...
flat_map
Could you please use flat_map to only iterate over the values by mapping with .values()?
.values()
On one hand, nested iterators are somewhat common (container of containers, iterator of containers, container of iterators), so introducing
flatten
could be useful.On the other hand,
flatten
,flat_map
, etc. are not mentioned in the Rust book...