3 ms·
It's not the butt-ugly code, but the copying. Yes, there are tricks to avoid copying an array just to update one element (if you don't have side effects ....),
by anamax 18y ago
It's not the butt-ugly code, but the copying. Yes, there are tricks to avoid copying an array just to update one element (if you don't have side effects ....), but at some point you just want to modify something.