From ea0cb032b3f33bfd99ce9ee1cf1059e4f886510c Mon Sep 17 00:00:00 2001 From: Sol Ackerman Date: Fri, 27 Feb 2015 11:34:49 -0600 Subject: [PATCH] allow updating sets --- src/clj/com/rpl/specter/impl.clj | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/clj/com/rpl/specter/impl.clj b/src/clj/com/rpl/specter/impl.clj index 9891885..73c5386 100644 --- a/src/clj/com/rpl/specter/impl.clj +++ b/src/clj/com/rpl/specter/impl.clj @@ -143,14 +143,7 @@ (into [] (r/mapcat (partial next-fn vals) structure))) (update* [this vals structure next-fn] (let [ret (r/map (partial next-fn vals) structure)] - (cond (vector? structure) - (into [] ret) - - (map? structure) - (into {} ret) - - :else - (into '() ret))) + (into (empty structure) ret)) )) (deftype ValStructurePath []