(diff as bs)
creates a diff of two sequences
(diff [1 2 3 4 5] [1 2 :a 4 5]) => [2 [[:- 2 1] [:+ 2 [:a]]]]
(diff [1 2 3 4 5] [1 :a 3 2 5]) => [4 [[:- 1 1] [:+ 1 [:a]] [:- 3 1] [:+ 3 [2]]]]
creates a diff of two sequences (diff [1 2 3 4 5] [1 2 :a 4 5]) => [2 [[:- 2 1] [:+ 2 [:a]]]] (diff [1 2 3 4 5] [1 :a 3 2 5]) => [4 [[:- 1 1] [:+ 1 [:a]] [:- 3 1] [:+ 3 [2]]]]
(patch as diff-result)
(patch insert-f remove-f as [d es])
uses a diff to reconcile two sequences
(patch [1 2 3 4 5] [4 [[:- 1 1] [:+ 1 [:a]] [:- 3 1] [:+ 3 [2]]]]) => [1 :a 3 2 5]
uses a diff to reconcile two sequences (patch [1 2 3 4 5] [4 [[:- 1 1] [:+ 1 [:a]] [:- 3 1] [:+ 3 [2]]]]) => [1 :a 3 2 5]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close