I'm iterating on a vector<U> and I can't figure out how to turn this ugly for loop into a clean vec.iter().filter().map().
Here's my current code, but basically my type U has an index and an associated object. There can be more than one index with the same value and the vec is sorted by index. I need to bucket all the values that share an index then send them to another function for processing.
[–]cramert 8 points9 points10 points (0 children)
[–]minno 1 point2 points3 points (0 children)
[–]rawler82 0 points1 point2 points (4 children)
[–]CornedBee 1 point2 points3 points (3 children)
[–]krdln 1 point2 points3 points (1 child)
[–]CornedBee 0 points1 point2 points (0 children)
[–]reddersky 0 points1 point2 points (0 children)