File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -4798,13 +4798,11 @@ reduces them without incurring seq initialization"
47984798 (loop [sentinel lookup-sentinel
47994799 m m
48004800 ks (seq ks)]
4801- (if ks
4802- (if (not (satisfies? ILookup m))
4803- not-found
4804- (let [m (get m (first ks) sentinel)]
4805- (if (identical? sentinel m)
4806- not-found
4807- (recur sentinel m (next ks)))))
4801+ (if-not (nil? ks)
4802+ (let [m (get m (first ks) sentinel)]
4803+ (if (identical? sentinel m)
4804+ not-found
4805+ (recur sentinel m (next ks))))
48084806 m))))
48094807
48104808(defn assoc-in
Original file line number Diff line number Diff line change 32103210 (is (zero? (hash-string nil )))
32113211 (is (not (zero? (hash-string " null" )))))
32123212
3213+ (deftest test-cljs-1721
3214+ (is (= 1 (get-in {:a (array 1 2 3 4 )} [:a 0 ] :not-found )))
3215+ (is (= :not-found (get-in {:a (array 1 2 3 4 )} [:a 4 ] :not-found )))
3216+ (is (= " d" (get-in {:a " data" } [:a 0 ] :not-found )))
3217+ (is (= :not-found (get-in {:a " data" } [:a 4 ] :not-found ))))
3218+
32133219(comment
32143220 ; ; ObjMap
32153221 ; ; (let [ks (map (partial str "foo") (range 500))
You can’t perform that action at this time.
0 commit comments