Liking cljdoc? Tell your friends :D

fooheads.setish


differenceclj/s

(difference s1)
(difference s1 s2)
(difference s1 s2 & sets)

Return a coll that is the first coll without elements of the remaining colls

Return a coll that is the first coll without elements of the remaining colls
raw docstring

extendclj/s

(extend xrel m)
(extend xrel k f)

Extends each tuple by assoc:ing k to the result of (f tuple). k can either be a new key or an existing key.

A map from k to f can also be specified, to extend multiple attributes in one call.

Extends each tuple by assoc:ing k to the result of (f tuple).
k can either be a new key or an existing key.

A map from k to f can also be specified, to extend multiple
attributes in one call.
raw docstring

indexclj/s

(index xrel ks)

Returns a map of the distinct values of ks in the xrel mapped to a set of the maps in xrel with the corresponding values of ks.

Returns a map of the distinct values of ks in the xrel mapped to a
set of the maps in xrel with the corresponding values of ks.
raw docstring

index-uniqueclj/s

(index-unique xrel ks)

Like index but requires that each key only have one value. The vals in the index is a single value and not in a collection like with index. Throws if the unique constraint is not met.

Like `index` but requires that each key only have one value. The vals in the
index is a single value and not in a collection like with `index`. Throws
if the unique constraint is not met.
raw docstring

intersectionclj/s

(intersection s1)
(intersection s1 s2)
(intersection s1 s2 & sets)

Return a coll that is the intersection of the input colls

Return a coll that is the intersection of the input colls
raw docstring

joinclj/s

(join xrel yrel)
(join xrel yrel km)

When passed 2 rels, returns the rel corresponding to the natural join. When passed an additional keymap, joins on the corresponding keys.

When passed 2 rels, returns the rel corresponding to the natural
join. When passed an additional keymap, joins on the corresponding
keys.
raw docstring

left-joinclj/s

(left-join xrel yrel km)

Joins, but always keeps enerything on the left, even if there is no match on the right. Each row will contain all keys from the left, plus all keys in the km (possibly with nil values), and, when there is a match, all keys from the right.

Joins, but always keeps enerything on the left, even if there is no
match on the right. Each row will contain all keys from the left, plus
all keys in the km (possibly with nil values), and, when there is a match,
all keys from the right.
raw docstring

map-invertclj/s

Returns the map with the vals mapped to the keys.

Returns the map with the vals mapped to the keys.
raw docstring

order-byclj/s

(order-by xrel keyfn)
(order-by xrel keyfn comp)

Orders the tuples according to keyfn and an optional comparator. Same behavior as clojure.core/sort-by, but with xrel in first position.

Orders the tuples according to keyfn and an optional comparator.
Same behavior as `clojure.core/sort-by`, but with xrel in first position.
raw docstring

projectclj/s

(project xrel attr-names)

Returns a rel of the elements of xrel with only the keys in ks

Returns a rel of the elements of xrel with only the keys in ks
raw docstring

renameclj/s

(rename xrel kmap)

Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap

Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap
raw docstring

rename-keysclj/s

Returns the map with the keys in kmap renamed to the vals in kmap

Returns the map with the keys in kmap renamed to the vals in kmap
raw docstring

restrictclj/s

(restrict xrel pred?)

Returns a coll of the elements for which pred is true. Same as select but with the rel in first position to be more useful in a -> chain.

Returns a coll of the elements for which pred is true. Same as `select` but
with the rel in first position to be more useful in a -> chain.
raw docstring

selectclj/s

(select pred? xrel)

Returns a coll of the elements for which pred is true

Returns a coll of the elements for which pred is true
raw docstring

setishclj/s

(setish xs)

Return a coll of the same type as xs but without duplicates.

Return a coll of the same type as xs but without duplicates.
raw docstring

subset?clj/s

(subset? coll1 coll2)

Is coll1 a subset of coll2

Is coll1 a subset of coll2
raw docstring

superset?clj/s

(superset? coll1 coll2)

Is coll1 a superset of coll2?

Is coll1 a superset of coll2?
raw docstring

unionclj/s

(union)
(union s1)
(union s1 s2)
(union s1 s2 & sets)

Return a coll that is the union of the input colls

Return a coll that is the union of the input colls
raw docstring

updateclj/s

(update xrel k f & args)

Like clojure.core/update, but works on each tuple in a rel.

Like clojure.core/update, but works on each tuple in a rel.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close