3 ms·
Maybe you're thinking of the zipper data structure? [1] Where you represent the composite structure hanging from the point you want to mutate, so updating that
by TuringTest 3y ago
Maybe you're thinking of the zipper data structure? [1]
Where you represent the composite structure hanging from the point you want to mutate, so updating that point is merely dropping the header and appending the updated value as a new prefix.
1 - https://en.m.wikipedia.org/wiki/Zipper_(data_structure) https://en.m.wikipedia.org/wiki/Zipper_(data_structure)