♻️ Ensure a correct usage of concat/into operations.

This commit is contained in:
Andrey Antukh 2021-11-30 19:02:27 +01:00
parent 4ad34ab5c8
commit 8a2a1d6d70
43 changed files with 446 additions and 373 deletions

View file

@ -630,8 +630,7 @@
(defn find-node-references [node]
(let [current (->> (find-attr-references (:attrs node)) (into #{}))
children (->> (:content node) (map find-node-references) (flatten) (into #{}))]
(-> (d/concat current children)
(vec))))
(vec (into current children))))
(defn find-def-references [defs references]
(loop [result (into #{} references)
@ -653,7 +652,7 @@
(let [node (get defs to-check)
new-refs (find-node-references node)
pending (concat pending new-refs)]
(recur (d/concat result new-refs)
(recur (into result new-refs)
(conj checked? to-check)
(first pending)
(rest pending))))))