juji-io/editscript

Suboptimal edit?

eneroth opened this issue · 2 comments

In this diff:

(def a [:zero {:x :y}])
(def b [:zero {:a "a" :b "b" :c "c" :d "d" :e "e"}])

(diff a b))
 
=> [[[1] :-] [[1] :+ {:a "a", :b "b", :c "c", :d "d", :e "e"}]]

… it seems like removing and adding would be suboptimal. Wouldn't replacing be a smaller solution?

[[[1] :r {:a "a", :b "b", :c "c", :d "d", :e "e"}]]

Thanks for reporting. I will look into this later.

Fixed in 0.4.4