Liking cljdoc? Tell your friends :D

bifurcan-clj.int-map

Functions for working with IntegerMaps specifically: an efficient, persistent data structure mapping longs to objects. See also bifurcan-clj.map for general-purpose map operations.

Functions for working with IntegerMaps specifically: an efficient,
persistent data structure mapping longs to objects. See also
bifurcan-clj.map for general-purpose map operations.
raw docstring

ceil-indexclj

(ceil-index m k)

The index of the entry whose key is either equal to key, or just above it. If key is greater than the maximum value in the map, returns null.

The index of the entry whose key is either equal to key, or just above it.
If key is greater than the maximum value in the map, returns null.
sourceraw docstring

comparatorclj

(comparator m)

The comparator of this map.

The comparator of this map.
sourceraw docstring

contains?clj

(contains? m k)

Does the given map contain a key?

Does the given map contain a key?
sourceraw docstring

entriesclj

(entries m)

Returns a list of entries in the map.

Returns a list of entries in the map.
sourceraw docstring

floor-indexclj

(floor-index m k)

The index of the entry whose key is either equal to key, or just below it. If key is less than the minimum value in the map, returns null.

The index of the entry whose key is either equal to key, or just below it.
If key is less than the minimum value in the map, returns null.
sourceraw docstring

Fromcljprotocol

fromclj

(from x)

Constructs an map from another collection. Can take a Bifurcan map, a Bifurcan list of Bifurcan Entries, or an iterable of anything that can be coerced to an Entry--Clojure map entries, [k v] vector pairs, or Bifurcan entries.

Constructs an map from another collection. Can take a Bifurcan map, a
Bifurcan list of Bifurcan Entries, or an iterable of anything that can
be coerced to an Entry--Clojure map entries, [k v] vector pairs, or
Bifurcan entries.
source

getclj

(get m k)
(get m k not-found)

Gets a key from a map. Returns the value, or nil if not found. Can take an explicit not-found value.

Gets a key from a map. Returns the value, or nil if not found. Can take an
explicit not-found value.
sourceraw docstring

index-ofclj

(index-of m k)

Returns the Long index of a key, if present, or nil.

Returns the Long index of a key, if present, or nil.
sourceraw docstring

int-mapclj

(int-map)

Constructs an integer map.

Constructs an integer map.
sourceraw docstring

nthclj

(nth m i)

The entry at index i.

The entry at index i.
sourceraw docstring

putclj

(put m k v)
(put m k v merge)

Sets a key to a value. Optionally takes a function (merge current-val new-val) to combine an existing value.

Sets a key to a value. Optionally takes a function (merge current-val
new-val) to combine an existing value.
sourceraw docstring

removeclj

(remove m k)

Removes a key from the map.

Removes a key from the map.
sourceraw docstring

sliceclj

(slice m min max)

A map representing all entries within [min max] inclusive.

A map representing all entries within [min max] inclusive.
sourceraw docstring

updateclj

(update m k f)
(update m k f a)
(update m k f a b)
(update m k f a b & more)

Updates a key by applying a function to the current value, or nil if it does not exist.

Updates a key by applying a function to the current value, or nil if it does
not exist.
sourceraw docstring

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

× close