Remove ALL! and filterer!
This commit is contained in:
parent
b3e581f737
commit
067ce9edee
2 changed files with 1 additions and 22 deletions
|
|
@ -797,15 +797,6 @@
|
|||
structure
|
||||
(range (count structure))))
|
||||
|
||||
(deftype TransientAllNavigator [])
|
||||
|
||||
(extend-protocol p/Navigator
|
||||
TransientAllNavigator
|
||||
(select* [this structure next-fn]
|
||||
(transient-all-select structure next-fn))
|
||||
(transform* [this structure next-fn]
|
||||
(transient-all-transform! structure next-fn)))
|
||||
|
||||
(defn extract-basic-filter-fn [path]
|
||||
(cond (fn? path)
|
||||
path
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
[defnav
|
||||
defpathedfn]])
|
||||
(:require [com.rpl.specter.impl :as i]
|
||||
[com.rpl.specter :refer [subselect]]))
|
||||
[com.rpl.specter :refer [subselect selected?]]))
|
||||
|
||||
(defnav
|
||||
^{:doc "Navigates to the specified key of a transient collection,
|
||||
|
|
@ -33,18 +33,6 @@
|
|||
"Navigates to the last element of a transient vector."
|
||||
(i/comp-paths* [(i/->TransientLastNavigator)]))
|
||||
|
||||
(def ALL!
|
||||
;; TODO: only works on transient vectors, not sets / maps; need a
|
||||
;; different name?
|
||||
"Navigates to each element of a transient vector."
|
||||
(i/comp-paths* [(i/->TransientAllNavigator)]))
|
||||
|
||||
(defpathedfn filterer!
|
||||
"Navigates to a view of the current transient vector that only
|
||||
contains elements that match the given path."
|
||||
[& path]
|
||||
(subselect ALL! (selected? path)))
|
||||
|
||||
(defn- select-keys-from-transient-map
|
||||
"Selects keys from transient map, because built-in select-keys uses
|
||||
`find` which is unsupported."
|
||||
|
|
|
|||
Loading…
Reference in a new issue