basilisp.set¶
Set manipulation utilities.
- fn (difference s)[source]¶
- fn (difference s & others)
Return a new set with elements from set
snot in theothers. If no others are provided, returns.
- fn (disjoint? s1 s2)[source]¶
Return true if set
s1shares no common elements with sets2.Sets are considered disjoint if and only if their intersection is the empty set.
- fn (index rel ks)[source]¶
Given a set of maps
rel, return a mapping of unique selections of keys fromksto the set of values which have those mappings.
- fn (intersection s)[source]¶
- fn (intersection s & others)
Return a new set with only elements in set
sthat are in all theothers. If no others are provided, returns.
- fn (join lrel rrel)[source]¶
- fn (join lrel rrel keymap)
Perform a natural join on the maps in
lrelandrrelusing keys shared by elements of each relation. Ifkeymapis specified, join only on the given keys.
- fn (map-invert m)[source]¶
Return a map whose vals and keys are swapped.
Duplicate values used as keys will overwrite each other as iteration order is non-deterministic.
- fn (project rel ks)[source]¶
Given a set of maps
rel, return a set of those maps with only the keys inks.
- fn (rename rel kmap)[source]¶
Given a set of maps
rel, return a set whose maps have had any keys inkmaprenamed to the value inkmap.
- fn (rename-keys m kmap)[source]¶
Return
mwith any keys appearing inkmapreplaced with the value inkmap.