Write patch over [start, end), splitting runs at the boundaries and
coalescing neighbors that end up identical. A patch value of undefined
or false deletes the key instead of storing it — see the additive-flags
contract at the top of the file.
Returns a new array of new runs; neither the input array nor its runs are
mutated (though a nested fill is shared by reference). Normalization —
merging identical neighbors, dropping empty runs — applies to the whole
array, not just the patched span, and to every call, including one whose
range is empty and so patches nothing.
Write
patchover[start, end), splitting runs at the boundaries and coalescing neighbors that end up identical. A patch value ofundefinedorfalsedeletes the key instead of storing it — see the additive-flags contract at the top of the file.Returns a new array of new runs; neither the input array nor its runs are mutated (though a nested
fillis shared by reference). Normalization — merging identical neighbors, dropping empty runs — applies to the whole array, not just the patched span, and to every call, including one whose range is empty and so patches nothing.