@@ -9304,7 +9304,10 @@ reduces them without incurring seq initialization"
93049304
93059305 ICollection
93069306 (-conj [coll o]
9307- (PersistentHashSet. meta (assoc hash-map o nil ) nil ))
9307+ (let [m (-assoc hash-map o nil )]
9308+ (if (identical? m hash-map)
9309+ coll
9310+ (PersistentHashSet. meta m nil ))))
93089311
93099312 IEmptyableCollection
93109313 (-empty [coll] (-with-meta (.-EMPTY PersistentHashSet) meta))
@@ -9341,7 +9344,10 @@ reduces them without incurring seq initialization"
93419344
93429345 ISet
93439346 (-disjoin [coll v]
9344- (PersistentHashSet. meta (-dissoc hash-map v) nil ))
9347+ (let [m (-dissoc hash-map v)]
9348+ (if (identical? m hash-map)
9349+ coll
9350+ (PersistentHashSet. meta m nil ))))
93459351
93469352 IFn
93479353 (-invoke [coll k]
@@ -9459,7 +9465,10 @@ reduces them without incurring seq initialization"
94599465
94609466 ICollection
94619467 (-conj [coll o]
9462- (PersistentTreeSet. meta (assoc tree-map o nil ) nil ))
9468+ (let [m (-assoc tree-map o nil )]
9469+ (if (identical? m tree-map)
9470+ coll
9471+ (PersistentTreeSet. meta m nil ))))
94639472
94649473 IEmptyableCollection
94659474 (-empty [coll] (PersistentTreeSet. meta (-empty tree-map) 0 ))
@@ -9513,7 +9522,10 @@ reduces them without incurring seq initialization"
95139522
95149523 ISet
95159524 (-disjoin [coll v]
9516- (PersistentTreeSet. meta (dissoc tree-map v) nil ))
9525+ (let [m (-dissoc tree-map v)]
9526+ (if (identical? m tree-map)
9527+ coll
9528+ (PersistentTreeSet. meta m nil ))))
95179529
95189530 IFn
95199531 (-invoke [coll k]
0 commit comments