3 ms·
I would have liked to see a comparison in the fold() section that functions the same way as the original for loop: list_of_lists.into_iter().fold(Vec::new(
by dmart 2y ago
I would have liked to see a comparison in the fold() section that functions the same way as the original for loop:
list_of_lists.into_iter().fold(Vec::new(),
|mut accumulator, list| {
accumulator.extend(list);
accumulator
}
)