C++ (Qt)std::list<int> src = {1,2,3,4,5,6,7,8,9, 10};std::vector<int> before = {2,3,4};std::array<int, 5> after = {-2,-3,-4,-5,-6}; auto out = replace(src, make_range(before), make_range(after));