
How Immutable Data Structures Are Optimized - tosh
https://hackernoon.com/how-immutable-data-structures-e-g-immutable-js-are-optimized-using-structural-sharing-e4424a866d56
======
partycoder
There are no immutable user defined data structures in JavaScript (and most of
the built-in ones are mutable as well).

They are "immutable" as an abstraction, but you can always mutate them in
runtime.

    
    
        const list = Immutable.List([1, 2, 3]);
        list.map = function() { return 'poop'; }
        console.log(list.map((e) => e));
    
        Output: "poop"

