Skip to content

0.1.26

Choose a tag to compare

@TimoKramer TimoKramer released this 16 Aug 04:24
7f30333
feat: container-type path dispatch + automatic same-length poke (#23)

Paths now resolve on the CONTAINER like clojure.core/get-in, not on the key's
type: a map keyed by integers is read as a map instead of being mistaken for an
array, so nested integer-map-key paths work (they previously resolved to the
wrong container or threw path-absent). child-offset drives both the value locator
and the structural (parent re-encode) path, which is rewritten off the offset
layer to match.

update-in-bytes and boring.mmap/splice! now detect a same-length result (d==0)
and take the poke path automatically -- overwrite in place, leave the frame
untouched, skip the tail move and reindex -- so a caller gets poke speed without
knowing to ask. The explicit poke* fns remain for callers who want a length
change to be a typed error.

Docs: README + doc/EDITING.md use keyword-keyed examples and document the
container dispatch and the automatic poke. Tests: nested integer-map-key
replace/add/dissoc, non-container-parent, same-length-keeps-the-frame, splice!
same-length -> [old old]. 546 tests / 28197 assertions, lint clean.