Created: 2023-01-11 10:22
In functional languages operations on data structures produce a new version of the data structure instead of mutating the data structure.
The old version is persisted.
Thus data structures can be shared, as in keeping pointers of the sections. Immutable data structures share memory <— better name!!!
Eg. in a list, take 2
would make a new pointer to the remaining of the list.
This results in increased performance, since only the overlapping parts of the structure have to be copied.