내가 기대한것
1 2 3 4 5 6 7 8 9 10 11 | arr.flatMap { it.asIterable() }.filter { it > 3 }.takeWhile { it != 5 }.forEach{ println(it) } | cs |
현실..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | vector<vector<int> > arr= { {1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5} }; list<int> flat; for(auto& a : arr){ for(auto& b : a){ flat.push_back(b); } } |
왜 안 이터레이터; 그리고 저거 이제 표준에 range TS 들어오면 가능함 ㅇㅇ
스칼라같네