Skip to content

Latest commit

 

History

History
160 lines (124 loc) · 4.07 KB

API.md

File metadata and controls

160 lines (124 loc) · 4.07 KB

bsless.keys

rename

(rename kmap)
(rename m kmap)

Like [[clojure.set/rename-keys]] but faster. If called without a map, returns a function that will rename keys according to kmap.
source

rename*

(rename* m)
(rename* m k0 k0')
(rename* m k0 k0' k1 k1')
(rename* m k0 k0' k1 k1' k2 k2')
(rename* m k0 k0' k1 k1' k2 k2' k3 k3')

source

rename-key!

(rename-key! m from to)

source

select

(select ks)
(select m ks)

Like [[clojure.core/select-keys]] but faster. If called without a map, returns a function with two arities which will select the provided keys. The returned function is operationally equivalent to: ((select ks) m) == (select-keys m ks) ((select ks) init m) == (merge init (select-keys m ks))
source

select*

(select* _)
(select* m k0)
(select* m k0 k1)
(select* m k0 k1 k2)
(select* m k0 k1 k2 k3)
(select* m k0 k1 k2 k3 k4)
(select* m k0 k1 k2 k3 k4 k5)
(select* m k0 k1 k2 k3 k4 k5 k6)
(select* m k0 k1 k2 k3 k4 k5 k6 k7)

Like [[select-keys]] but the provided keys don't have to be provided as a vector. Aggressively in-lines iteration.
source

select-as

(select-as kmap)
(select-as m kmap)

Like [[clojure.core/select-as-keys]] but faster and renames keys according to kmap. If called without a map, returns a function with two arities which will select-as the provided keys. The returned function is operationally equivalent to: ((select-as kmap) m) == (select-as m kmap) ((select-as kmap) init m) == (merge init (select-as m kmap))
source

select-as*

(select-as* _)
(select-as* m k0 k0')
(select-as* m k0 k0' k1 k1')
(select-as* m k0 k0' k1 k1' k2 k2')
(select-as* m k0 k0' k1 k1' k2 k2' k3 k3')
(select-as* m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4')
(select-as* m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4' k5 k5')
(select-as* m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4' k5 k5' k6 k6')
(select-as* m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4' k5 k5' k6 k6' k7 k7')

Like [[select-as-keys]] but the keys are provided as rest arguments. Aggressively in-lines iteration.
source

select-into*

(select-into* to _)
(select-into* to m k0)
(select-into* to m k0 k1)
(select-into* to m k0 k1 k2)
(select-into* to m k0 k1 k2 k3)
(select-into* to m k0 k1 k2 k3 k4)
(select-into* to m k0 k1 k2 k3 k4 k5)
(select-into* to m k0 k1 k2 k3 k4 k5 k6)
(select-into* to m k0 k1 k2 k3 k4 k5 k6 k7)

Like [[select-keys]] but the provided keys don't have to be provided as a vector. Aggressively in-lines iteration.
source

select-into-as*

(select-into-as* to)
(select-into-as* to m k0 k0')
(select-into-as* to m k0 k0' k1 k1')
(select-into-as* to m k0 k0' k1 k1' k2 k2')
(select-into-as* to m k0 k0' k1 k1' k2 k2' k3 k3')
(select-into-as* to m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4')
(select-into-as* to m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4' k5 k5')
(select-into-as* to m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4' k5 k5' k6 k6')
(select-into-as* to m k0 k0' k1 k1' k2 k2' k3 k3' k4 k4' k5 k5' k6 k6' k7 k7')

Like [[select-as-keys]] but the keys are provided as rest arguments. Aggressively in-lines iteration.
source

select-key

(select-key acc m k)

source

select-key!

(select-key! m)
(select-key! acc k)
(select-key! acc m k)

source

select-key-as!

(select-key-as! acc m k k')

source