mirror of
https://github.com/penpot/penpot.git
synced 2026-04-27 20:28:11 +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
35f8e1b084
commit
efe9302b9f
@ -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