Fix #128
This commit is contained in:
parent
96ad0ff68c
commit
9ff9ef6650
3 changed files with 9 additions and 2 deletions
|
|
@ -13,6 +13,7 @@
|
|||
* Added low-level `richnav` macro for creating navigators with full flexibility
|
||||
* Bug fix: multi-path and if-path now work properly with value collection
|
||||
* Bug fix: END, BEGINNING, FIRST, LAST, and MAP-VALS now work properly on nil
|
||||
* Bug fix: ALL and MAP-VALS now maintain the comparator of sorted maps
|
||||
|
||||
## 0.11.2
|
||||
* Renamed com.rpl.specter.transient namespace to com.rpl.specter.transients to eliminate ClojureScript compiler warning about reserved keyword
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@
|
|||
|
||||
#+clj clojure.lang.PersistentTreeMap #+cljs cljs.core/PersistentTreeMap
|
||||
(all-transform [structure next-fn]
|
||||
(non-transient-map-all-transform structure next-fn (sorted-map))
|
||||
(non-transient-map-all-transform structure next-fn (empty structure))
|
||||
)
|
||||
|
||||
#+clj clojure.lang.PersistentHashMap #+cljs cljs.core/PersistentHashMap
|
||||
|
|
@ -963,7 +963,7 @@
|
|||
|
||||
#+clj clojure.lang.PersistentTreeMap #+cljs cljs.core/PersistentTreeMap
|
||||
(map-vals-transform [structure next-fn]
|
||||
(map-vals-non-transient-transform structure (sorted-map) next-fn)
|
||||
(map-vals-non-transient-transform structure (empty structure) next-fn)
|
||||
)
|
||||
|
||||
#+clj clojure.lang.PersistentHashMap #+cljs cljs.core/PersistentHashMap
|
||||
|
|
|
|||
|
|
@ -1295,3 +1295,9 @@
|
|||
(select [(s/multi-path (s/collect-one :a) (s/collect-one :c)) :b]
|
||||
{:a 1 :b 2 :c 3})))
|
||||
)
|
||||
|
||||
(deftest sorted-map-by-transform
|
||||
(let [amap (sorted-map-by > 1 10 2 20 3 30)]
|
||||
(is (= [3 2 1] (keys (transform s/MAP-VALS inc amap))))
|
||||
(is (= [3 2 1] (keys (transform [s/ALL s/LAST] inc amap))))
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue