implement ALL NONE removal for some of default cases

This commit is contained in:
nathanmarz 2017-01-08 13:30:14 -05:00
parent fca11410b4
commit 9617aa1931

View file

@ -156,17 +156,20 @@
;; reduce-kv is much faster than doing r/map through call to (into ...) ;; reduce-kv is much faster than doing r/map through call to (into ...)
(reduce-kv (reduce-kv
(fn [m k v] (fn [m k v]
;;TODO: need to handle NONE here (let [newkv (next-fn [k v])]
(let [[newk newv] (next-fn [k v])] (if (identical? newkv i/NONE)
(assoc m newk newv))) m
(assoc m (nth newkv 0) (nth newkv 1)))))
empty-structure empty-structure
structure) structure)
:else :else
;;TODO: need to handle NONE here (->> structure
(->> structure (r/map next-fn) (into empty-structure)))))) (r/map next-fn)
(r/filter #(-> % (identical? i/NONE) not))
(into empty-structure))))))
#?(:cljs default) #?(:cljs default)