mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
⚡ Add xf:add-index transducer to app.common.data
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
89a1ee7813
commit
aea437f5ef
@ -41,6 +41,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(def xf:map-id (map :id))
|
||||
(def xf:add-index (map-indexed (fn [index item] (assoc item ::index index))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Data Structures
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user