@@ -1608,7 +1608,9 @@ reduces them without incurring seq initialization"
1608
1608
(-meta [coll] meta)
1609
1609
IWithMeta
1610
1610
(-with-meta [coll new-meta]
1611
- (IndexedSeq. arr i new-meta))
1611
+ (if (identical? new-meta meta)
1612
+ coll
1613
+ (IndexedSeq. arr i new-meta)))
1612
1614
1613
1615
ASeq
1614
1616
ISeq
@@ -1708,7 +1710,9 @@ reduces them without incurring seq initialization"
1708
1710
(-meta [coll] meta)
1709
1711
IWithMeta
1710
1712
(-with-meta [coll new-meta]
1711
- (RSeq. ci i new-meta))
1713
+ (if (identical? new-meta meta)
1714
+ coll
1715
+ (RSeq. ci i new-meta)))
1712
1716
1713
1717
ISeqable
1714
1718
(-seq [coll] coll)
@@ -3063,7 +3067,10 @@ reduces them without incurring seq initialization"
3063
3067
(-clone [_] (List. meta first rest count __hash))
3064
3068
3065
3069
IWithMeta
3066
- (-with-meta [coll meta] (List. meta first rest count __hash))
3070
+ (-with-meta [coll new-meta]
3071
+ (if (identical? new-meta meta)
3072
+ coll
3073
+ (List. new-meta first rest count __hash)))
3067
3074
3068
3075
IMeta
3069
3076
(-meta [coll] meta)
@@ -3137,7 +3144,10 @@ reduces them without incurring seq initialization"
3137
3144
(-clone [_] (EmptyList. meta))
3138
3145
3139
3146
IWithMeta
3140
- (-with-meta [coll meta] (EmptyList. meta))
3147
+ (-with-meta [coll new-meta]
3148
+ (if (identical? new-meta meta)
3149
+ coll
3150
+ (EmptyList. new-meta)))
3141
3151
3142
3152
IMeta
3143
3153
(-meta [coll] meta)
@@ -3240,7 +3250,10 @@ reduces them without incurring seq initialization"
3240
3250
(-clone [_] (Cons. meta first rest __hash))
3241
3251
3242
3252
IWithMeta
3243
- (-with-meta [coll meta] (Cons. meta first rest __hash))
3253
+ (-with-meta [coll new-meta]
3254
+ (if (identical? new-meta meta)
3255
+ coll
3256
+ (Cons. new-meta first rest __hash)))
3244
3257
3245
3258
IMeta
3246
3259
(-meta [coll] meta)
@@ -3436,7 +3449,10 @@ reduces them without incurring seq initialization"
3436
3449
(not fn ))
3437
3450
3438
3451
IWithMeta
3439
- (-with-meta [coll meta] (LazySeq. meta #(-seq coll) nil __hash))
3452
+ (-with-meta [coll new-meta]
3453
+ (if (identical? new-meta meta)
3454
+ coll
3455
+ (LazySeq. new-meta #(-seq coll) nil __hash)))
3440
3456
3441
3457
IMeta
3442
3458
(-meta [coll] meta)
@@ -3554,8 +3570,10 @@ reduces them without incurring seq initialization"
3554
3570
(-lastIndexOf coll x start))
3555
3571
3556
3572
IWithMeta
3557
- (-with-meta [coll m]
3558
- (ChunkedCons. chunk more m __hash))
3573
+ (-with-meta [coll new-meta]
3574
+ (if (identical? new-meta meta)
3575
+ coll
3576
+ (ChunkedCons. chunk more new-meta __hash)))
3559
3577
3560
3578
IMeta
3561
3579
(-meta [coll] meta)
@@ -4832,7 +4850,10 @@ reduces them without incurring seq initialization"
4832
4850
(some? current))
4833
4851
4834
4852
IWithMeta
4835
- (-with-meta [coll meta] (Cycle. meta all prev current _next))
4853
+ (-with-meta [coll new-meta]
4854
+ (if (identical? new-meta meta)
4855
+ coll
4856
+ (Cycle. new-meta all prev current _next)))
4836
4857
4837
4858
IMeta
4838
4859
(-meta [coll] meta)
@@ -4904,7 +4925,10 @@ reduces them without incurring seq initialization"
4904
4925
(-realized? [coll] false )
4905
4926
4906
4927
IWithMeta
4907
- (-with-meta [coll meta] (Repeat. meta count val next nil ))
4928
+ (-with-meta [coll new-meta]
4929
+ (if (identical? new-meta meta)
4930
+ coll
4931
+ (Repeat. new-meta count val next nil )))
4908
4932
4909
4933
IMeta
4910
4934
(-meta [coll] meta)
@@ -5010,7 +5034,10 @@ reduces them without incurring seq initialization"
5010
5034
(not (identical? seed UNREALIZED-SEED)))
5011
5035
5012
5036
IWithMeta
5013
- (-with-meta [coll meta] (Iterate. meta f prev-seed seed next))
5037
+ (-with-meta [coll new-meta]
5038
+ (if (identical? new-meta meta)
5039
+ coll
5040
+ (Iterate. new-meta f prev-seed seed next)))
5014
5041
5015
5042
IMeta
5016
5043
(-meta [coll] meta)
@@ -5476,7 +5503,10 @@ reduces them without incurring seq initialization"
5476
5503
(-clone [_] (PersistentVector. meta cnt shift root tail __hash))
5477
5504
5478
5505
IWithMeta
5479
- (-with-meta [coll meta] (PersistentVector. meta cnt shift root tail __hash))
5506
+ (-with-meta [coll new-meta]
5507
+ (if (identical? new-meta meta)
5508
+ coll
5509
+ (PersistentVector. new-meta cnt shift root tail __hash)))
5480
5510
5481
5511
IMeta
5482
5512
(-meta [coll] meta)
@@ -5718,8 +5748,10 @@ reduces them without incurring seq initialization"
5718
5748
(-lastIndexOf coll x start))
5719
5749
5720
5750
IWithMeta
5721
- (-with-meta [coll m]
5722
- (chunked-seq vec node i off m))
5751
+ (-with-meta [coll new-meta]
5752
+ (if (identical? new-meta meta)
5753
+ coll
5754
+ (chunked-seq vec node i off new-meta)))
5723
5755
IMeta
5724
5756
(-meta [coll] meta)
5725
5757
@@ -5813,7 +5845,10 @@ reduces them without incurring seq initialization"
5813
5845
(-clone [_] (Subvec. meta v start end __hash))
5814
5846
5815
5847
IWithMeta
5816
- (-with-meta [coll meta] (build-subvec meta v start end __hash))
5848
+ (-with-meta [coll new-meta]
5849
+ (if (identical? new-meta meta)
5850
+ coll
5851
+ (build-subvec new-meta v start end __hash)))
5817
5852
5818
5853
IMeta
5819
5854
(-meta [coll] meta)
@@ -6172,7 +6207,10 @@ reduces them without incurring seq initialization"
6172
6207
(-lastIndexOf coll x start))
6173
6208
6174
6209
IWithMeta
6175
- (-with-meta [coll meta] (PersistentQueueSeq. meta front rear __hash))
6210
+ (-with-meta [coll new-meta]
6211
+ (if (identical? new-meta meta)
6212
+ coll
6213
+ (PersistentQueueSeq. new-meta front rear __hash)))
6176
6214
6177
6215
IMeta
6178
6216
(-meta [coll] meta)
@@ -6234,7 +6272,10 @@ reduces them without incurring seq initialization"
6234
6272
(PersistentQueueIter. front (-iterator rear)))
6235
6273
6236
6274
IWithMeta
6237
- (-with-meta [coll meta] (PersistentQueue. meta count front rear __hash))
6275
+ (-with-meta [coll new-meta]
6276
+ (if (identical? new-meta meta)
6277
+ coll
6278
+ (PersistentQueue. new-meta count front rear __hash)))
6238
6279
6239
6280
IMeta
6240
6281
(-meta [coll] meta)
@@ -6364,7 +6405,10 @@ reduces them without incurring seq initialization"
6364
6405
(-equiv this other))
6365
6406
6366
6407
IWithMeta
6367
- (-with-meta [coll meta] (ObjMap. meta keys strobj update-count __hash))
6408
+ (-with-meta [coll new-meta]
6409
+ (if (identical? new-meta meta)
6410
+ coll
6411
+ (ObjMap. new-meta keys strobj update-count __hash)))
6368
6412
6369
6413
IMeta
6370
6414
(-meta [coll] meta)
@@ -6710,7 +6754,9 @@ reduces them without incurring seq initialization"
6710
6754
6711
6755
IWithMeta
6712
6756
(-with-meta [coll new-meta]
6713
- (PersistentArrayMapSeq. arr i new-meta))
6757
+ (if (identical? new-meta _meta)
6758
+ coll
6759
+ (PersistentArrayMapSeq. arr i new-meta)))
6714
6760
6715
6761
ICounted
6716
6762
(-count [coll]
@@ -6794,7 +6840,10 @@ reduces them without incurring seq initialization"
6794
6840
(-clone [_] (PersistentArrayMap. meta cnt arr __hash))
6795
6841
6796
6842
IWithMeta
6797
- (-with-meta [coll meta] (PersistentArrayMap. meta cnt arr __hash))
6843
+ (-with-meta [coll new-meta]
6844
+ (if (identical? new-meta meta)
6845
+ coll
6846
+ (PersistentArrayMap. new-meta cnt arr __hash)))
6798
6847
6799
6848
IMeta
6800
6849
(-meta [coll] meta)
@@ -7664,7 +7713,10 @@ reduces them without incurring seq initialization"
7664
7713
(-meta [coll] meta)
7665
7714
7666
7715
IWithMeta
7667
- (-with-meta [coll meta] (NodeSeq. meta nodes i s __hash))
7716
+ (-with-meta [coll new-meta]
7717
+ (if (identical? new-meta meta)
7718
+ coll
7719
+ (NodeSeq. new-meta nodes i s __hash)))
7668
7720
7669
7721
ICollection
7670
7722
(-conj [coll o] (cons o coll))
@@ -7742,7 +7794,10 @@ reduces them without incurring seq initialization"
7742
7794
(-meta [coll] meta)
7743
7795
7744
7796
IWithMeta
7745
- (-with-meta [coll meta] (ArrayNodeSeq. meta nodes i s __hash))
7797
+ (-with-meta [coll new-meta]
7798
+ (if (identical? new-meta meta)
7799
+ coll
7800
+ (ArrayNodeSeq. new-meta nodes i s __hash)))
7746
7801
7747
7802
ICollection
7748
7803
(-conj [coll o] (cons o coll))
@@ -7835,7 +7890,10 @@ reduces them without incurring seq initialization"
7835
7890
root-iter)))
7836
7891
7837
7892
IWithMeta
7838
- (-with-meta [coll meta] (PersistentHashMap. meta cnt root has-nil? nil-val __hash))
7893
+ (-with-meta [coll new-meta]
7894
+ (if (identical? new-meta meta)
7895
+ coll
7896
+ (PersistentHashMap. new-meta cnt root has-nil? nil-val __hash)))
7839
7897
7840
7898
IMeta
7841
7899
(-meta [coll] meta)
@@ -8161,8 +8219,10 @@ reduces them without incurring seq initialization"
8161
8219
(-meta [coll] meta)
8162
8220
8163
8221
IWithMeta
8164
- (-with-meta [coll meta]
8165
- (PersistentTreeMapSeq. meta stack ascending? cnt __hash))
8222
+ (-with-meta [coll new-meta]
8223
+ (if (identical? new-meta meta)
8224
+ coll
8225
+ (PersistentTreeMapSeq. new-meta stack ascending? cnt __hash)))
8166
8226
8167
8227
IReduce
8168
8228
(-reduce [coll f] (seq-reduce f coll))
@@ -8703,7 +8763,10 @@ reduces them without incurring seq initialization"
8703
8763
(-clone [_] (PersistentTreeMap. comp tree cnt meta __hash))
8704
8764
8705
8765
IWithMeta
8706
- (-with-meta [coll meta] (PersistentTreeMap. comp tree cnt meta __hash))
8766
+ (-with-meta [coll new-meta]
8767
+ (if (identical? new-meta meta)
8768
+ coll
8769
+ (PersistentTreeMap. comp tree cnt new-meta __hash)))
8707
8770
8708
8771
IMeta
8709
8772
(-meta [coll] meta)
@@ -8892,7 +8955,10 @@ reduces them without incurring seq initialization"
8892
8955
(-meta [coll] _meta)
8893
8956
8894
8957
IWithMeta
8895
- (-with-meta [coll new-meta] (KeySeq. mseq new-meta))
8958
+ (-with-meta [coll new-meta]
8959
+ (if (identical? new-meta _meta)
8960
+ coll
8961
+ (KeySeq. mseq new-meta)))
8896
8962
8897
8963
ISeqable
8898
8964
(-seq [coll] coll)
@@ -8968,7 +9034,10 @@ reduces them without incurring seq initialization"
8968
9034
(-meta [coll] _meta)
8969
9035
8970
9036
IWithMeta
8971
- (-with-meta [coll new-meta] (ValSeq. mseq new-meta))
9037
+ (-with-meta [coll new-meta]
9038
+ (if (identical? new-meta _meta)
9039
+ coll
9040
+ (ValSeq. mseq new-meta)))
8972
9041
8973
9042
ISeqable
8974
9043
(-seq [coll] coll)
@@ -9105,7 +9174,10 @@ reduces them without incurring seq initialization"
9105
9174
(HashSetIter. (-iterator hash-map)))
9106
9175
9107
9176
IWithMeta
9108
- (-with-meta [coll meta] (PersistentHashSet. meta hash-map __hash))
9177
+ (-with-meta [coll new-meta]
9178
+ (if (identical? new-meta meta)
9179
+ coll
9180
+ (PersistentHashSet. new-meta hash-map __hash)))
9109
9181
9110
9182
IMeta
9111
9183
(-meta [coll] meta)
@@ -9259,7 +9331,10 @@ reduces them without incurring seq initialization"
9259
9331
(-clone [_] (PersistentTreeSet. meta tree-map __hash))
9260
9332
9261
9333
IWithMeta
9262
- (-with-meta [coll meta] (PersistentTreeSet. meta tree-map __hash))
9334
+ (-with-meta [coll new-meta]
9335
+ (if (identical? new-meta meta)
9336
+ coll
9337
+ (PersistentTreeSet. new-meta tree-map __hash)))
9263
9338
9264
9339
IMeta
9265
9340
(-meta [coll] meta)
@@ -9622,7 +9697,10 @@ reduces them without incurring seq initialization"
9622
9697
(-clone [_] (Range. meta start end step chunk chunk-next __hash))
9623
9698
9624
9699
IWithMeta
9625
- (-with-meta [rng meta] (Range. meta start end step chunk chunk-next __hash))
9700
+ (-with-meta [rng new-meta]
9701
+ (if (identical? new-meta meta)
9702
+ rng
9703
+ (Range. new-meta start end step chunk chunk-next __hash)))
9626
9704
9627
9705
IMeta
9628
9706
(-meta [rng] meta)
0 commit comments