File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -10385,11 +10385,22 @@ reduces them without incurring seq initialization"
10385
10385
10386
10386
(defn- simple-map-entry [k v]
10387
10387
(reify
10388
+ IVector
10389
+ (-assoc-n [_ n x]
10390
+ (case n
10391
+ 0 (simple-map-entry x v)
10392
+ 1 (simple-map-entry k x)
10393
+ (throw (js/Error. " Index out of bounds" ))))
10388
10394
IMapEntry
10389
10395
(-key [_] k)
10390
10396
(-val [_] v)
10391
10397
ISeqable
10392
- (-seq [_] (IndexedSeq. #js [k v] 0 nil ))))
10398
+ (-seq [_] (IndexedSeq. #js [k v] 0 nil ))
10399
+ IIndexed
10400
+ (-nth [_ i]
10401
+ (case i, 0 k, 1 v, (throw (js/Error. " Index out of bounds" ))))
10402
+ (-nth [_ i not-found]
10403
+ (case i, 0 k, 1 v, not-found))))
10393
10404
10394
10405
(defn- pr-writer-impl
10395
10406
[obj writer opts]
You can’t perform that action at this time.
0 commit comments