function | since v0.0-927 | ![]() | Edit |
(insert-right loc item)
Inserts the item as the right sibling of the node at this loc, without moving
(defn insert-right
[loc item]
(let [[node {r :r :as path}] loc]
(if (nil? path)
(throw "Insert at top")
(with-meta [node (assoc path :r (cons item r) :changed? true)] (meta loc)))))