extend ALL to records (for walker reimplementation)
This commit is contained in:
parent
550d486954
commit
e8f15c4137
1 changed files with 7 additions and 0 deletions
|
|
@ -129,6 +129,13 @@
|
||||||
(all-transform [structure next-fn]
|
(all-transform [structure next-fn]
|
||||||
(non-transient-map-all-transform structure next-fn (empty structure)))
|
(non-transient-map-all-transform structure next-fn (empty structure)))
|
||||||
|
|
||||||
|
clojure.lang.IRecord
|
||||||
|
(all-transform [structure next-fn]
|
||||||
|
(reduce
|
||||||
|
(fn [res kv] (conj res (next-fn kv)))
|
||||||
|
structure
|
||||||
|
structure
|
||||||
|
))
|
||||||
|
|
||||||
#?(:clj clojure.lang.PersistentHashMap :cljs cljs.core/PersistentHashMap)
|
#?(:clj clojure.lang.PersistentHashMap :cljs cljs.core/PersistentHashMap)
|
||||||
(all-transform [structure next-fn]
|
(all-transform [structure next-fn]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue