| Commit message (Collapse) | Author | Files | Lines |
|
|
|
This is Cow-style mutation: we clone only what's shared and then mutate
it. This it more legible and more efficient than the immutable version.
|
|
The goal is that we might avoid cloning internals in the common case
where a value is not shared
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This allows encapsulating invariants properly and reducing clutter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|