X Tutup
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/clj/clojure/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6158,8 +6158,14 @@ fails, attempts to require sym's namespace and retries."
{:added "1.2"
:static true}
([m ks]
(reduce1 get m ks))
(if (vector? m)
(try (reduce nth m ks)
(catch Exception e nil))
(reduce1 get m ks)))
([m ks not-found]
(if (vector? m)
(try (reduce nth m ks)
(catch Exception e not-found))
(loop [sentinel (Object.)
m m
ks (seq ks)]
Expand All @@ -6168,7 +6174,7 @@ fails, attempts to require sym's namespace and retries."
(if (identical? sentinel m)
not-found
(recur sentinel m (next ks))))
m))))
m)))))

(defn assoc-in
"Associates a value in a nested associative structure, where ks is a
Expand Down
X Tutup