From e8f15c4137630c0f446ea9ffbc5a39a8ed86e568 Mon Sep 17 00:00:00 2001 From: nathanmarz Date: Thu, 1 Jun 2017 01:27:24 -0400 Subject: [PATCH] extend ALL to records (for walker reimplementation) --- src/clj/com/rpl/specter/navs.cljc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/clj/com/rpl/specter/navs.cljc b/src/clj/com/rpl/specter/navs.cljc index 9435860..c965849 100644 --- a/src/clj/com/rpl/specter/navs.cljc +++ b/src/clj/com/rpl/specter/navs.cljc @@ -129,6 +129,13 @@ (all-transform [structure next-fn] (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) (all-transform [structure next-fn]