      :quantity 4}})
 
 
-[[:chapter {:title "Miscellaneous addenda"}]]
+[[:chapter {:title "Miscellaneous"}]]
 
 [[:section {:title "Diffing"}]]
 

                   (c/add-items [{:id 1 :name "bananas" :category "Long fruit"}
                                 {:id 2 :name "grapes" :category "Small round fruit"}
                                 {:id 3 :name "tomatoes" :category "Pretend fruit"}]))]
    (c/diff source target) => {:add
                               #{{:id 5, :name "blueberries", :category "Blue fruit"}
                                 {:id 4, :name "strawberries", :category "Red fruit"}},
                               :modify
                               #{{:source {:id 2, :name "grapes", :category "New fruit"},
                                  :target {:id 2, :name "grapes", :category "Small round fruit"}}
                                 {:source {:id 1, :name "bananas", :category "Old fruit"},
                                  :target {:id 1, :name "bananas", :category "Long fruit"}}},
                               :remove #{{:id 3, :name "tomatoes", :category "Pretend fruit"}}}

    (c/apply-diff target {:add
                          #{{:id 5, :name "blueberries", :category "Blue fruit"}

                             :target {:id 2, :name "grapes", :category "Small round fruit"}}
                            {:source {:id 1, :name "bananas", :category "Old fruit"},
                             :target {:id 1, :name "bananas", :category "Long fruit"}}},
                          :remove #{{:id 3, :name "tomatoes", :category "Pretend fruit"}}}) =>
    source))


(comment
