We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fb6f06 commit 046442eCopy full SHA for 046442e
1 file changed
src/editscript/patch.cljc
@@ -9,8 +9,7 @@
9
;;
10
11
(ns ^:no-doc editscript.patch
12
- (:require [clojure.set :as set]
13
- [editscript.edit :as e]
+ (:require [editscript.edit :as e]
14
[editscript.util.common :as c]
15
[clojure.string :as s]))
16
@@ -31,7 +30,7 @@
31
30
;;if p is ##NaN, then p cannot be found in x, for (= ##NaN ##NaN) is false!
32
:map (dissoc x p)
33
:vec (into (subvec x 0 p) (subvec x (inc ^long p)))
34
- :set (set/difference x #{p})
+ :set (disj x p)
35
:lst (->> (split-at p x)
36
(#(concat (nth % 0) (next (nth % 1))))
37
(apply list))))
@@ -77,7 +76,7 @@
77
76
(case (e/get-type x)
78
:map (assoc x p v)
79
:vec (assoc x p v)
80
- :set (-> x (set/difference #{p}) (conj v))
+ :set (-> x (disj p) (conj v))
81
82
(#(concat (nth % 0) (conj (rest (nth % 1)) v)))
83
0 commit comments