sorted-map entries are real map-entries (jolt-jk23)
sorted-map seq/first/entries built plain [k v] vectors, so map-entry? was false and key/val threw. Build them via a new jolt.host/map-entry seam (entry-flagged pvec), matching a regular map's entries. Re-minted.
This commit is contained in:
parent
9ca30a236d
commit
76f8274603
3 changed files with 353 additions and 348 deletions
|
|
@ -221,7 +221,9 @@
|
|||
(tree-collect (sfield sc :tree) proj []))
|
||||
|
||||
;; --- sorted-map ops ---------------------------------------------------------
|
||||
(defn- map-entry [t] [(nd-key t) (nd-val t)])
|
||||
;; a real map-entry (map-entry? true), so key/val/seq destructuring work like a
|
||||
;; regular map's entries.
|
||||
(defn- map-entry [t] (jolt.host/map-entry (nd-key t) (nd-val t)))
|
||||
|
||||
(defn- sm-get [sm k not-found]
|
||||
(let [n (tree-lookup (sfield sm :tree) (the-cmp sm) k)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue