mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
⚡ Improve performance of concat
operation.
This commit is contained in:
parent
86ba4fd083
commit
3ec037cdf4
1 changed files with 3 additions and 3 deletions
|
@ -28,12 +28,12 @@
|
|||
|
||||
(defn concat
|
||||
[& colls]
|
||||
(loop [result (first colls)
|
||||
(loop [result (transient (first colls))
|
||||
colls (rest colls)]
|
||||
(if (seq colls)
|
||||
(recur (reduce conj result (first colls))
|
||||
(recur (reduce conj! result (first colls))
|
||||
(rest colls))
|
||||
result)))
|
||||
(persistent! result))))
|
||||
|
||||
(defn enumerate
|
||||
([items] (enumerate items 0))
|
||||
|
|
Loading…
Reference in a new issue