4 ms·
Yes. The right data structure for the right job. If your array only has one future---ie there are no references to the unchanged array around---you can re-use
by eru 13y ago
Yes. The right data structure for the right job.
If your array only has one future---ie there are no references to the unchanged array around---you can re-use the old array. That means you get to mutate in place but still pretend you have immutability.