2 ms·
But this is (largely) a property of the functions you write rather than the data structures. You can get virtually all of the benefit in the procedural world by
by UncleMeat 8y ago
But this is (largely) a property of the functions you write rather than the data structures. You can get virtually all of the benefit in the procedural world by just writing pure functions.
- vbuwivbiu 8y agowhen you have immutable data structures by default you get the additional assurance that other places in the code that previously used an input to a function can continue to work with their data without needing to worry that it might have been changed by its use by a function elsewhere, since that function cannot modify the data, only return a new 'version' (through structural-sharing)