Liking cljdoc? Tell your friends :D
Clojure only.

missing.core


*preempt*clj

source

=icclj

(=ic _)
(=ic s1 s2)
(=ic s1 s2 & ss)

Like = but ignores casing.

Like = but ignores casing.
sourceraw docstring

ascending-by?clj

(ascending-by? key-fn coll)
(ascending-by? key-fn comparator coll)

Is coll ascending according to the supplied key-fn and comparator?

Is coll ascending according to the supplied key-fn and comparator?
sourceraw docstring

ascending?clj

(ascending? coll)
(ascending? comparator coll)

Is coll ascending according to the supplied comparator?

Is coll ascending according to the supplied comparator?
sourceraw docstring

assoc*clj

(assoc* m k v)
(assoc* map key val & kvs)

Like assoc, but assumes associng into nil with an integer key means 'I want a vector' and not 'I want a map'

Like assoc, but assumes associng into nil with an integer
key means 'I want a vector' and not 'I want a map'
sourceraw docstring

assoc-in*clj

(assoc-in* m [k & ks] v)

Like assoc-in but with assoc* semantics.

Like assoc-in but with assoc* semantics.
sourceraw docstring

attemptcljmacro

(attempt)
(attempt x)
(attempt x & next)

Returns result of first form that doesn't throw and doesn't return nil.

Returns result of first form that doesn't throw and doesn't return nil.
sourceraw docstring

backoffcljmacro

(backoff max & body)

Runs body up to max times with an exponential backoff strategy.

Runs body up to max times with an exponential backoff strategy.
sourceraw docstring

backoff-seqclj

(backoff-seq)
(backoff-seq max)

Returns an infinite seq of exponential back-off timeouts with random jitter.

Returns an infinite seq of exponential back-off timeouts with random jitter.
sourceraw docstring

base64->bytesclj

(base64->bytes b64)

Converts a base64 encoded string into a byte array.

Converts a base64 encoded string into a byte array.
sourceraw docstring

basenameclj

(basename filename)

Get the filename (without extension) from a filename

Get the filename (without extension) from a filename
sourceraw docstring

bfsclj

(bfs pred form)
(bfs pred form default)

Breadth first search through a form for the first form that matches pred.

Breadth first search through a form for the first form that matches pred.
sourceraw docstring

(binary-search coll x)
(binary-search compare coll x)

Implements a generic binary search algorithm. Find a value in coll for which (compare value x) is 0, else nil. coll should already be sorted.

Implements a generic binary search algorithm. Find a value in coll
for which (compare value x) is 0, else nil. coll should already be
sorted.
sourceraw docstring

bytes->base64clj

(bytes->base64 bites)

Converts a byte array into a base64 encoded string.

Converts a byte array into a base64 encoded string.
sourceraw docstring

bytes->hexclj

(bytes->hex bites)

Converts a byte array into a hex encoded string.

Converts a byte array into a hex encoded string.
sourceraw docstring

cartesian-productclj

(cartesian-product)
(cartesian-product xs)
(cartesian-product xs ys)
(cartesian-product xs ys & more)
source

cascade-byclj

(cascade-by key-fns coll)

Group coll using all prefix lists of key-fns. The result being a map with which you can look up groups to any depth.

Group coll using all prefix lists of key-fns. The
result being a map with which you can look up groups
to any depth.
sourceraw docstring

clampclj

(clamp start end x)

Returns x if in range or returns start or end (whichever x is nearest).

Both bounds are inclusive.

Returns x if in range or returns start or end (whichever x is nearest).

Both bounds are inclusive.
sourceraw docstring

collateclj

(collate f+colls)

Given a map or sequence of [key-fn coll] pairs, create a lookup table from disparate data sets. Define how to compute the primary key from each set and it'll give you back a map of primary key to vector of 'columns'.

Given a map or sequence of [key-fn coll] pairs, create a
lookup table from disparate data sets. Define how to compute
the primary key from each set and it'll give you back a map
of primary key to vector of 'columns'.
sourceraw docstring

concatvclj

(concatv & xs)

Returns the concatenation as a vector.

Returns the concatenation as a vector.
sourceraw docstring

contains-all?clj

(contains-all? coll [k & more :as keys])

Does coll contain every key?

Does coll contain every key?
sourceraw docstring

contiguous-byclj

(contiguous-by f-start f-stop)
(contiguous-by f-start f-stop coll)

Transducer that partitions collections into contiguous segments according to the comparables returned by f-start and f-stop.

Transducer that partitions collections into contiguous segments
according to the comparables returned by f-start and f-stop.
sourceraw docstring

dedupe-byclj

(dedupe-by f)
(dedupe-by f coll)

Like dedupe but according to a key-fn instead of the element itself.

Like dedupe but according to a key-fn instead of the element itself.
sourceraw docstring

deep-mergeclj

(deep-merge & maps)

Merges nested maps.

Merges nested maps.
sourceraw docstring

defaultcljmacro

(default f default)

Wrap f to return a default value if f returns nil.

Wrap f to return a default value if f returns nil.
sourceraw docstring

defmemocljmacro

(defmemo & defnargs)

Define a function with a memoized implementation.

Define a function with a memoized implementation.
sourceraw docstring

defmethodsetcljmacro

(defmethodset symbol dispatch-keys & body)

Like defmethod but allows for specifying implementations of multiple dispatch keys at once.

Like defmethod but allows for specifying implementations of multiple dispatch keys at once.
sourceraw docstring

defmulti*cljmacro

(defmulti* symbol dispatch-fn)

Like clojure.core/defmulti, but actually updates the dispatch value when you reload it.

Like clojure.core/defmulti, but actually updates the dispatch value when you reload it.
sourceraw docstring

defonce-protocolcljmacro

(defonce-protocol sym & body)

Like defprotocol but won't reload the protocol when you reload the ns.

Like defprotocol but won't reload the protocol when you reload the ns.
sourceraw docstring

defpatchcljmacro

(defpatch symbol bindings & body)

An anaphoric macro for patching existing functions. Original function is bound to the symbol 'this'. Safe to execute multiple times, 'this' will always refer to the original implementation and never the previously patched implementation.

An anaphoric macro for patching existing functions. Original function is bound to the symbol 'this'.
Safe to execute multiple times, 'this' will always refer to the original implementation and never
the previously patched implementation.
sourceraw docstring

defpatchmethodcljmacro

(defpatchmethod multifn dispatch-val bindings & body)

An anaphoric macro for patching existing multimethods. Original method is bound to the symbol 'this'. Safe to execute multiple times, 'this' will always refer to the original implementation and never the previously patched implementation.

An anaphoric macro for patching existing multimethods. Original method is bound to the symbol 'this'.
Safe to execute multiple times, 'this' will always refer to the original implementation and never
the previously patched implementation.
sourceraw docstring

defweakmemocljmacro

(defweakmemo & defnargs)

Define a function with a weakly memoized implementation.

Define a function with a weakly memoized implementation.
sourceraw docstring

delete-fileclj

(delete-file file)

Deletes the file whether it's a file or a directory.

Deletes the file whether it's a file or a directory.
sourceraw docstring

descending-by?clj

(descending-by? key-fn coll)
(descending-by? key-fn comparator coll)

Is coll descending according to the supplied key-fn and comparator?

Is coll descending according to the supplied key-fn and comparator?
sourceraw docstring

descending?clj

(descending? coll)
(descending? comparator coll)

Is coll descending according to the supplied comparator?

Is coll descending according to the supplied comparator?
sourceraw docstring

dfsclj

(dfs pred form)
(dfs pred form default)

Depth first search through a form for the first form that matches pred.

Depth first search through a form for the first form that matches pred.
sourceraw docstring

diff-byclj

(diff-by key-fn a b)

Like clojure.data/diff when used on sets except keyed by key-fn instead of the elements themselves.

Like clojure.data/diff when used on sets except keyed by
key-fn instead of the elements themselves.
sourceraw docstring

dissoc-inclj

(dissoc-in m [k & ks])

Dissociate a key/value from a map at a given path.

Dissociate a key/value from a map at a given path.
sourceraw docstring

distinct-byclj

(distinct-by f)
(distinct-by f coll)

Like distinct but according to a key-fn instead of the element itself.

Like distinct but according to a key-fn instead of the element itself.
sourceraw docstring

distinct-by?clj

(distinct-by? f coll)

Like distinct? but according to a key-fn instead of the element itself.

Like distinct? but according to a key-fn instead of the element itself.
sourceraw docstring

doforcecljmacro

(doforce)
(doforce x)
(doforce x & next)

Execute each top-level form of the body even if they throw, and return nil if there was an error.

Execute each top-level form of the body even if they throw,
and return nil if there was an error.
sourceraw docstring

doworkcljmacro

(dowork bindings & body)

Like clojure.core/doseq but with configurable levels of parallelism for each 'loop'. Right-hand side of bindings should be tuples of [collection parallelism] and left-hand side of bindings can be any binding target (symbol or destructuring). Returns nil after all the work has been completed.

Like clojure.core/doseq but with configurable levels of parallelism for each 'loop'.
Right-hand side of bindings should be tuples of [collection parallelism] and left-hand
side of bindings can be any binding target (symbol or destructuring). Returns
nil after all the work has been completed.
sourceraw docstring

drop*clj

(drop* n coll)

An alternative implementation of clojure.core/drop that provides a more efficient implementation for certain types of coll.

An alternative implementation of clojure.core/drop that
provides a more efficient implementation for certain types
of coll.
sourceraw docstring

drop-untilclj

(drop-until pred)
(drop-until pred coll)

Like clojure.core/drop-while, except inverted pred.

Like clojure.core/drop-while, except inverted pred.
sourceraw docstring

drop-uptoclj

(drop-upto pred)
(drop-upto pred coll)

Returns a lazy sequence of the items in coll starting after the first item for which (pred item) returns true.

Returns a lazy sequence of the items in coll starting *after* the first item
for which `(pred item)` returns true.
sourceraw docstring

duration-explainclj

(duration-explain duration)

Converts millis or a java.time.Duration into a human-readable description.

Converts millis or a java.time.Duration into a human-readable description.
sourceraw docstring

duration-partsclj

(duration-parts duration)

Given millis or a java.time.Duration return a map of time unit to amount of time in that unit. Bucket the duration into larger time units before smaller time units.

Given millis or a java.time.Duration return a map of time unit
to amount of time in that unit. Bucket the duration into larger
time units before smaller time units.
sourceraw docstring

exclusive?clj

(exclusive? s1 s2 & ss)

Returns true if the provided collections are mutually exclusive.

Returns true if the provided collections are mutually exclusive.
sourceraw docstring

extremaclj

(extrema coll)

Returns a tuple of [smallest largest] element in the collection.

Returns a tuple of [smallest largest] element in the collection.
sourceraw docstring

extrema-byclj

(extrema-by f coll)

Returns a tuple of [smallest largest] in coll according to some fn of an element.

Returns a tuple of [smallest largest] in coll according to some fn of an element.
sourceraw docstring

filter-entriesclj

(filter-entries pred m)
source

filter-groupsclj

(filter-groups f m)

Filter items in groups for the groups in a map of category to group.

Filter items in groups for the groups in a map of category to group.
sourceraw docstring

filter-keysclj

(filter-keys pred m)

Filter a map by a predicate on its keys

Filter a map by a predicate on its keys
sourceraw docstring

filter-nthclj

(filter-nth n pred coll)

Filters a seq based on a function of the nth position.

Filters a seq based on a function of the nth position.
sourceraw docstring

filter-valsclj

(filter-vals pred m)

Filter a map by a predicate on its values

Filter a map by a predicate on its values
sourceraw docstring

filter1clj

(filter1 pred coll)

Filters a seq of tuples on a predicate of the first elements.

Filters a seq of tuples on a predicate of the first elements.
sourceraw docstring

filter2clj

(filter2 pred coll)

Filters a seq of tuples on a predicate of the second elements.

Filters a seq of tuples on a predicate of the second elements.
sourceraw docstring

firsts-byclj

(firsts-by key-fn coll)

Filter a sequence to only the first elements of each partition determined by key-fn.

Filter a sequence to only the first elements of each partition determined by key-fn.
sourceraw docstring

fixed-pointclj

(fixed-point f x)
(fixed-point max f x)

Finds the fixed point of f given initial input x. Optionally provide a max number of iterations to attempt before returning nil, else runs indefinitely if no fixed point is found.

Finds the fixed point of f given initial input x. Optionally
provide a max number of iterations to attempt before returning
nil, else runs indefinitely if no fixed point is found.
sourceraw docstring

flatten1clj

(flatten1 coll)

Flattens one level of nested collections.

Flattens one level of nested collections.
sourceraw docstring

flipclj

(flip f)

Returns a new function that applies the provided arguments in reverse order.

Returns a new function that applies the provided arguments in reverse order.
sourceraw docstring

get*clj

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

Like clojure.core/get except treats strings and keywords as interchangeable and not-found as the result if there is no found value or if the found value is nil.

Like clojure.core/get except treats strings and keywords
as interchangeable and not-found as the result if there is
no found value *or* if the found value is nil.
sourceraw docstring

get-extensionclj

(get-extension filename)

Get the file extension from a filename.

Get the file extension from a filename.
sourceraw docstring

get-fieldclj

(get-field obj field)

Access an object field, even if private or protected.

Access an object field, even if private or protected.
sourceraw docstring

get-in*clj

(get-in* m ks)
(get-in* m ks not-found)

Like clojure.core/get-in except built atop get*.

Like clojure.core/get-in except built atop get*.
sourceraw docstring

get-jar-versionclj

(get-jar-version dep)

Returns the version of a jar. Dep should be the same symbol that appears in leiningen/deps dependencies.

Returns the version of a jar. Dep should be the same symbol that appears
in leiningen/deps dependencies.
sourceraw docstring

glob-matcherclj

(glob-matcher glob)
(glob-matcher dir glob)

Returns a predicate that will match a file against a glob pattern.

Returns a predicate that will match a file against a glob pattern.
sourceraw docstring

glob-seqclj

(glob-seq dir & globs)

Returns a sequence of files and directories nested within dir that match one of the provided glob patterns.

Returns a sequence of files and directories nested within dir that match one of the provided glob patterns.
sourceraw docstring

greatestclj

(greatest coll)

Returns the largest element in the collection.

Returns the largest element in the collection.
sourceraw docstring

greatest-byclj

(greatest-by f coll)

Returns the largest element according to some fn of the element

Returns the largest element according to some fn of the element
sourceraw docstring

group-by-labelsclj

(group-by-labels f coll)

Groups elements in coll according to all the submaps of the map returned by f.

Groups elements in coll according to all the submaps of the map returned by f.
sourceraw docstring

groupcat-byclj

(groupcat-by f coll)

Like group-by except f is expected to return a sequence of keys that the element should be bucketed by.

Like group-by except f is expected to return a sequence of keys
that the element should be bucketed by.
sourceraw docstring

grouping->pairsclj

(grouping->pairs m)

Turn a map of groupings into a flat sequence of pairs of key and single value.

Turn a map of groupings into a flat sequence of pairs of key and single value.
sourceraw docstring

gtclj

(gt)
(gt _)
(gt a b)
(gt a b & more)

Like > but for comparables.

Like > but for comparables.
sourceraw docstring

gteclj

(gte)
(gte _)
(gte a b)
(gte a b & more)

Like >= but for comparables.

Like >= but for comparables.
sourceraw docstring

hex->bytesclj

(hex->bytes hex)

Converts a hex encoded string into a byte array.

Converts a hex encoded string into a byte array.
sourceraw docstring

if-let*cljmacro

(if-let* bindings then)
(if-let* bindings then else)

Like clojure.core/if-let except supports multiple bindings.

Like clojure.core/if-let except supports multiple bindings.
sourceraw docstring

if-seqcljmacro

(if-seq bindings then)
(if-seq bindings then else)

Like if-some* but takes the else branch if seq is empty.

Like if-some* but takes the else branch if seq is empty.
sourceraw docstring

if-some*cljmacro

(if-some* bindings then)
(if-some* bindings then else)

Like clojure.core/if-some except supports multiple bindings.

Like clojure.core/if-some except supports multiple bindings.
sourceraw docstring

if-textcljmacro

(if-text bindings then)
(if-text bindings then else)

Like if-some* but takes the else branch if text is blank.

Like if-some* but takes the else branch if text is blank.
sourceraw docstring

index-byclj

(index-by key-fn coll)

Index the items of a collection into a map by a key

Index the items of a collection into a map by a key
sourceraw docstring

index-values-by-pathsclj

(index-values-by-paths form)

Returns a map of path => value at path for any data structure

Returns a map of path => value at path for any data structure
sourceraw docstring

indexcat-byclj

(indexcat-by f coll)

Like index-by except f is expected to return a sequence of keys that the element should be indexed by.

Like index-by except f is expected to return a sequence of keys
that the element should be indexed by.
sourceraw docstring

indexedclj

(indexed coll)

Creates a [index item] seq of tuples.

Creates a [index item] seq of tuples.
sourceraw docstring

indexes-byclj

(indexes-by key-fns coll)

Index coll by multiple keys to create a nested lookup path.

Index coll by multiple keys to create a nested lookup path.
sourceraw docstring

intersect?clj

(intersect? s1 s2 & ss)

Returns true if the provided collections overlap.

Returns true if the provided collections overlap.
sourceraw docstring

iterable?clj

(iterable? x)

Is collection like or a single value?

Is collection like or a single value?
sourceraw docstring

iterloopcljmacro

(iterloop bindings & body)

Used just like loop/recur, but returns a lazy sequence of the bindings from each iteration. The last tuple in the generated sequence will contain only one value (your return value). Does not support nested recur constructs because I am lazy. Recommend that you maintain your accumulator in the first register so that the return value aligns.

Used just like loop/recur, but returns a lazy sequence of the bindings from each iteration.
The last tuple in the generated sequence will contain only one value (your return value).
Does not support nested recur constructs because I am lazy. Recommend that you maintain
your accumulator in the first register so that the return value aligns.
sourceraw docstring

jaccard-coefficientclj

(jaccard-coefficient s1 s2)

Returns a ratio between 0 and 1 representing the degree of overlap between sets.

Returns a ratio between 0 and 1 representing the degree of overlap between sets.
sourceraw docstring

join-pathsclj

(join-paths & paths)

Join paths together. Accepts string arguments or collections (which will be flattened). '/' delimiters already at the beginning or end of a segment will be removed leaving only a single '/' between each segment.

Join paths together. Accepts string arguments or collections
(which will be flattened). '/' delimiters already at the
beginning or end of a segment will be removed leaving only
a single '/' between each segment.
sourceraw docstring

keep-entriesclj

(keep-entries f m)

Map and only keep entries with non-nil keys and values.

Map and only keep entries with non-nil keys and values.
sourceraw docstring

keep-keysclj

(keep-keys f m)

Map and only keep non-nil keys.

Map and only keep non-nil keys.
sourceraw docstring

keep-valsclj

(keep-vals f m)

Map and only keep non-nil values.

Map and only keep non-nil values.
sourceraw docstring

keepcatclj

(keepcat f)
(keepcat f & colls)

A transducer like mapcat except removes nil elements.

A transducer like mapcat except removes nil elements.
sourceraw docstring

key=clj

(key= & more)

Equality after conversion to keywords. Use when you're unsure if the arguments are strings or keywords

Equality after conversion to keywords. Use when you're unsure if the
arguments are strings or keywords
sourceraw docstring

keyedcljmacro

(keyed & keys)

Creates a map of keyword => value from symbol names and the values they refer to.

Creates a map of keyword => value from symbol names and the values they refer to.
sourceraw docstring

keysetclj

(keyset m)

Returns the keys of a map as a set.

Returns the keys of a map as a set.
sourceraw docstring

last*clj

(last* coll)
source

lasts-byclj

(lasts-by key-fn coll)

Filter a sequence to only the last elements of each partition determined by key-fn.

Filter a sequence to only the last elements of each partition determined by key-fn.
sourceraw docstring

leastclj

(least coll)

Returns the smallest element in the collection.

Returns the smallest element in the collection.
sourceraw docstring

least-byclj

(least-by f coll)

Returns the smallest element according to some fn of the element

Returns the smallest element according to some fn of the element
sourceraw docstring

left-padclj

(left-pad s length pad)

Pad a string on the left until it satisfies a desired width.

Pad a string on the left until it satisfies a desired width.
sourceraw docstring

letdcljmacro

(letd bindings & body)

Like clojure.core/let except delays and forces each binding value. Use this when you don't want to evaluate potentially expensive bindings until you refer to their value in the body of the code. Supports nesting, dependencies between bindings, shadowing, destructuring, and closures.

Like clojure.core/let except delays and forces each binding value. Use
this when you don't want to evaluate potentially expensive bindings
until you refer to their value in the body of the code. Supports nesting,
dependencies between bindings, shadowing, destructuring, and closures.
sourceraw docstring

letpcljmacro

(letp bindings & body)

Like clojure.core/let but allows early returns via (preempt return-value)

Like clojure.core/let but allows early returns via (preempt return-value)
sourceraw docstring

lift-byclj

(lift-by lift f)

Returns a function that first applies the lift to each argument before applying the original function.

Returns a function that first applies the lift to each argument before applying the original function.
sourceraw docstring

llastclj

(llast coll)

The complement to clojure.core/ffirst.

The complement to clojure.core/ffirst.
sourceraw docstring

load-edn-resourceclj

(load-edn-resource path)

Load and parse an edn file from the filesystem if given an absolute path or the classpath otherwise. See read-edn-string for notes on tagged literals.

Load and parse an edn file from the filesystem if given an absolute path or the classpath otherwise.
See read-edn-string for notes on tagged literals.
sourceraw docstring

locate-fileclj

(locate-file path)

Given a path attempts to find the best matching file. file: prefix to mandate file system path classpath: prefix to mandate classpath leading slash presumes file system otherwise, check classpath first, then filesystem

Given a path attempts to find the best matching file.
file:      prefix to mandate file system path
classpath: prefix to mandate classpath
leading slash presumes file system
otherwise, check classpath first, then filesystem
sourceraw docstring

lstripclj

(lstrip s strip)

Strip a prefix from a string.

Strip a prefix from a string.
sourceraw docstring

ltclj

(lt)
(lt _)
(lt a b)
(lt a b & more)

Like < but for comparables.

Like < but for comparables.
sourceraw docstring

lteclj

(lte)
(lte _)
(lte a b)
(lte a b & more)

Like <= but for comparables.

Like <= but for comparables.
sourceraw docstring

map-entriesclj

(map-entries f m)

Transform the entries of a map

Transform the entries of a map
sourceraw docstring

map-entryclj

(map-entry k v)

Creates a map entry from key k and value v.

Creates a map entry from key k and value v.
sourceraw docstring

map-groupsclj

(map-groups f m)

Map items in groups for the groups in a map of category to group.

Map items in groups for the groups in a map of category to group.
sourceraw docstring

map-keysclj

(map-keys f m)

Transform the keys of a map

Transform the keys of a map
sourceraw docstring

map-nthclj

(map-nth n f coll)

Updates the nth position of each element in a seq of tuples.

Updates the nth position of each element in a seq of tuples.
sourceraw docstring

map-valsclj

(map-vals f m)

Transform the values of a map

Transform the values of a map
sourceraw docstring

map1clj

(map1 f coll)

Updates the first position of each element in a seq of tuples.

Updates the first position of each element in a seq of tuples.
sourceraw docstring

map2clj

(map2 f coll)

Updates the second position of each element in a seq of tuples.

Updates the second position of each element in a seq of tuples.
sourceraw docstring

mapcat-groupsclj

(mapcat-groups f m)

Mapcat items in groups for the groups in a map of category to group.

Mapcat items in groups for the groups in a map of category to group.
sourceraw docstring

maps->rowsclj

(maps->rows coll)
(maps->rows coll all-keys?)

Converts a sequence of maps into a sequence of vectors with a header.

Converts a sequence of maps into a sequence of vectors with a header.
sourceraw docstring

maximums-byclj

(maximums-by key-fn coll)
(maximums-by key-fn comparator coll)

Returns the set of maximum elements in coll according to key-fn. Elements are compared using comparator (defaults to compare).

Returns the set of maximum elements in coll according to key-fn.  Elements
are compared using comparator (defaults to compare).
sourceraw docstring

md5-checksumclj

(md5-checksum bites)

Hashes a byte array and returns the md5 checksum (hex encoded)

Hashes a byte array and returns the md5 checksum (hex encoded)
sourceraw docstring

merge-sortclj

(merge-sort colls)
(merge-sort comparator colls)

Lazily produces a sorted sequence from many sorted input sequences according to comp.

Lazily produces a sorted sequence from many sorted input sequences according to comp.
sourceraw docstring

merge-sort-byclj

(merge-sort-by key-fn colls)
(merge-sort-by key-fn comparator colls)

Lazily produces a sorted sequence from many sorted input sequences according to key-fn and comp.

Lazily produces a sorted sequence from many sorted input sequences according to key-fn and comp.
sourceraw docstring

minimums-byclj

(minimums-by key-fn coll)
(minimums-by key-fn comparator coll)

Returns the set of minimum elements in coll according to key-fn. Elements are compared using comparator (defaults to compare).

Returns the set of minimum elements in coll according to key-fn. Elements
are compared using comparator (defaults to compare).
sourceraw docstring

n?clj

(n? n pred coll)

Are there exactly n things in coll that satisfy pred?

Are there exactly n things in coll that satisfy pred?
sourceraw docstring

norcljmacro

(nor & more)

Expands to (and (not form1) (not form2) ...)

Expands to (and (not form1) (not form2) ...)
sourceraw docstring

not-blank?clj

(not-blank? s)
source

not-empty?clj

(not-empty? coll)
source

oncecljmacro

(once & body)

Runs a piece of code that evaluates only once (per ns) until the source changes.

Runs a piece of code that evaluates only once (per ns) until the source changes.
sourceraw docstring

one?clj

(one? pred coll)

Is there exactly one thing in coll that satisfies pred?

Is there exactly one thing in coll that satisfies pred?
sourceraw docstring

onlyclj

(only coll)

Returns the only item from a collection if the collection only consists of one item, else nil.

Returns the only item from a collection if the collection only consists of one item, else nil.
sourceraw docstring

pagingclj

(paging f)
(paging limit f)
(paging offset limit f)

A function that returns a lazily generating sequence backed by a paged source. Takes a function that receives an offset and limit and returns the page for those parameters.

:f A function of two arguments (offset and limit) that fetches some kind of results.

:limit A number representing how many objects to fetch per page. Defaults to 512.

:offset A number representing what index to start getting results from. Defaults to 0.

A function that returns a lazily generating sequence
backed by a paged source. Takes a function that receives
an offset and limit and returns the page for those parameters.

  :f A function of two arguments (offset and limit) that fetches some kind of results.

  :limit A number representing how many objects to fetch per page. Defaults to 512.

  :offset A number representing what index to start getting results from. Defaults to 0.
sourceraw docstring

parse-best-guessclj

(parse-best-guess s)
source

parse-numberclj

(parse-number s)
source

partition-all*clj

(partition-all* n coll)

An alternative implementation of clojure.core/partition-all that provides a more efficient implementation for certain types of coll.

An alternative implementation of clojure.core/partition-all that
provides a more efficient implementation for certain types
of coll.
sourceraw docstring

partition-withclj

(partition-with pred)
(partition-with pred coll)

Returns a lazy sequence of partitions where a new partition is created every time pred returns true. Returns a transducer when only provided pred.

Returns a lazy sequence of partitions where a new
partition is created every time pred returns true.
Returns a transducer when only provided pred.
sourceraw docstring

pathsclj

(paths form)

Returns all the paths into a data structure. Paths are compatible with (get-in form path).

Returns all the paths into a data structure. Paths are compatible
with `(get-in form path)`.
sourceraw docstring

pfilterclj

(pfilter pred coll)

Like filter, but with the predicate executed concurrently.

Like filter, but with the predicate executed concurrently.
sourceraw docstring

pgroup-byclj

(pgroup-by f coll)

Like group-by, but with the key function executed concurrently.

Like group-by, but with the key function executed concurrently.
sourceraw docstring

piecewiseclj

(piecewise f & colls)

Applies f to respective elements across each provided collection. f should be an associative function of two arguments.

Applies f to respective elements across each provided
collection. f should be an associative function of two
arguments.
sourceraw docstring

pindex-byclj

(pindex-by f coll)

Lke index-by, but with the key function executed concurrently.

Lke index-by, but with the key function executed concurrently.
sourceraw docstring

pivot-groupingclj

(pivot-grouping m)

Take a map of categories to items and turn it into a map of items to categories.

Take a map of categories to items and turn it into a map of items to categories.
sourceraw docstring

pmapcatclj

(pmapcat f coll)
(pmapcat f coll & colls)

Like mapcat, but with f executed concurrently.

Like mapcat, but with f executed concurrently.
sourceraw docstring

ppclj

(pp x)

Prints the argument and returns it.

Prints the argument and returns it.
sourceraw docstring

preemptclj

(preempt result)

To be used inside of a preemptable. Call preempt within a preemptable to deliver a return value for the entire preemptable and abort further computation by interrupting the thread.

To be used inside of a preemptable. Call preempt within a preemptable
to deliver a return value for the entire preemptable and abort further
computation by interrupting the thread.
sourceraw docstring

preemptablecljmacro

(preemptable & body)

Mark a point in the stack that can be the target of a preemption. Calling preempt within a preemptable will result in the value of the preemptable being the value passed to preempt if called, otherwise the value of the preemptable will be the result of the complete evaluation of the interior.

Mark a point in the stack that can be the target of a preemption.
Calling preempt within a preemptable will result in the value of
the preemptable being the value passed to preempt if called, otherwise
the value of the preemptable will be the result of the complete evaluation
of the interior.
sourceraw docstring

prefixesclj

(prefixes coll)

Returns all prefixes of coll.

Returns all prefixes of coll.
sourceraw docstring

premoveclj

(premove pred coll)

Like remove, but with the predicate executed concurrently.

Like remove, but with the predicate executed concurrently.
sourceraw docstring

qualify-identclj

(qualify-ident prefix k)

Adds a namespace prefix to a given key.

Adds a namespace prefix to a given key.
sourceraw docstring

qualify-keysclj

(qualify-keys prefix form)

Adds a namespace prefix to all map keys throughout form.

Adds a namespace prefix to all map keys throughout form.
sourceraw docstring

qualify-top-keysclj

(qualify-top-keys prefix m)

Adds a namespace prefix to all top level keys in m.

Adds a namespace prefix to all top level keys in m.
sourceraw docstring

quietlycljmacro

(quietly & body)

Execute the body and return nil if there was an error

Execute the body and return nil if there was an error
sourceraw docstring

(range-search coll x)

From an ordered set of ranges, find the range which contains x, else nil.

From an ordered set of ranges, find the range which contains x, else nil.
sourceraw docstring

range?clj

(range? coll)
source

read-edn-stringclj

(read-edn-string s)

Reads a string of edn and returns the parsed data. Applies all loaded data readers and falls back to blindly forwarding tagged literals when no applicable reader exists. Be careful to only call this when you either trust the input or know that you have no data readers loaded that can invoke dangerous code for arbitrary input.

Reads a string of edn and returns the parsed data. Applies all loaded data
readers and falls back to blindly forwarding tagged literals when no applicable
reader exists. Be careful to only call this when you either trust the input
or know that you have no data readers loaded that can invoke dangerous code
for arbitrary input.
sourceraw docstring

reduce-groupsclj

(reduce-groups f m)
(reduce-groups f val m)

Reduce items in groups for the groups in a map of category to group.

Reduce items in groups for the groups in a map of category to group.
sourceraw docstring

remove-groupsclj

(remove-groups f m)

Remove items from groups in a map of category to group.

Remove items from groups in a map of category to group.
sourceraw docstring

remove-keysclj

(remove-keys pred m)

Filter a map by the complement of predicate on its keys

Filter a map by the complement of predicate on its keys
sourceraw docstring

remove-valsclj

(remove-vals pred m)

Filter a map by the complement of predicate on its values

Filter a map by the complement of predicate on its values
sourceraw docstring

reset-var!clj

(reset-var! v value)

Sets the root value of a var.

Sets the root value of a var.
sourceraw docstring

returningcljmacro

(returning value & body)

A macro that computes value, executes body, then returns value.

A macro that computes value, executes body, then returns value.
sourceraw docstring

reverse*clj

(reverse* coll)

An alternative implementation of clojure.core/reverse that provides a more efficient implementation for certain types of coll.

An alternative implementation of clojure.core/reverse that
provides a more efficient implementation for certain types
of coll.
sourceraw docstring

reverse-groupingclj

(reverse-grouping m)

Take a map of categories to items and turn it into a map of item to category.

Take a map of categories to items and turn it into a map of item to category.
sourceraw docstring

reverse-mapclj

(reverse-map m)

Invert a map

Invert a map
sourceraw docstring

right-padclj

(right-pad s length pad)

Pads a string on the right until it satisfies a desired width.

Pads a string on the right until it satisfies a desired width.
sourceraw docstring

rstripclj

(rstrip s strip)

Strip a suffix from a string.

Strip a suffix from a string.
sourceraw docstring

run-par!clj

(run-par! f coll)

Like run! but executes each element concurrently.

Like run! but executes each element concurrently.
sourceraw docstring

seekclj

(seek pred coll)
(seek pred coll not-found)

Find the first element in the collection that matches pred, else returns not-found. Note that using seek can lead to poor performance. You should always use indexed data structures instead of multiple seeks over the same data.

Find the first element in the collection that matches pred,
else returns not-found. Note that using seek can lead to
poor performance. You should always use indexed data
structures instead of multiple seeks over the same data.
sourceraw docstring

seek-indexedclj

(seek-indexed pred coll)

Returns [index item] for the first item that matches pred.

Returns [index item] for the first item that matches pred.
sourceraw docstring

single?clj

(single? x)

Is this a collection of a single value?

Is this a collection of a single value?
sourceraw docstring

sliding-iterateclj

(sliding-iterate f init)

Iterate, but each new term is a function of the last N terms.

f should be a function of N arguments that computes the next term. init should be a sequence of length N containing the first N terms.

Iterate, but each new term is a function of the last N terms.

f should be a function of N arguments that computes the next term.
init should be a sequence of length N containing the first N terms.
sourceraw docstring

sorted-map-by-valueclj

(sorted-map-by-value m)
(sorted-map-by-value m comparator)

Returns a sorted map with entries sorted by values. Supply your own comparator if you want to reverse order or customize the sort.

Returns a sorted map with entries sorted by values. Supply
your own comparator if you want to reverse order or customize
the sort.
sourceraw docstring

split-at*clj

(split-at* index coll)

An alternative implementation of clojure.core/split-at that provides a more efficient implementation for certain types of coll.

An alternative implementation of clojure.core/split-at that
provides a more efficient implementation for certain types
of coll.
sourceraw docstring

stringedcljmacro

(stringed & keys)

Creates a map of string => value from symbol names and the values they refer to.

Creates a map of string => value from symbol names and the values they refer to.
sourceraw docstring

stringify-identclj

(stringify-ident ident)

Converts a keyword / symbol into a full string representation (including namespaces if qualified).

Converts a keyword / symbol into a full string
representation (including namespaces if qualified).
sourceraw docstring

stringify-keysclj

(stringify-keys form)

Converts all map keys into strings throughout form.

Converts all map keys into strings throughout form.
sourceraw docstring

submap?clj

(submap? m1 m2)

Is m1 a submap of m2?

Is m1 a submap of m2?
sourceraw docstring

submapsclj

(submaps m)

Returns all the submaps of a map

Returns all the submaps of a map
sourceraw docstring

subsetsclj

(subsets coll)

Returns all the subsets of a collection

Returns all the subsets of a collection
sourceraw docstring

subvec*clj

(subvec* vec start)
(subvec* vec start end)

Like clojure.core/subvec but clamped.

Like clojure.core/subvec but clamped.
sourceraw docstring

supermap?clj

(supermap? m1 m2)

Is m1 a supermap of m2?

Is m1 a supermap of m2?
sourceraw docstring

symmetric-differenceclj

(symmetric-difference s1 s2)

Returns the union of the exclusive portions of s1 and s2.

Returns the union of the exclusive portions of s1 and s2.
sourceraw docstring

take*clj

(take* n coll)

An alternative implementation of clojure.core/take that provides a more efficient implementation for certain types of coll.

An alternative implementation of clojure.core/take that
provides a more efficient implementation for certain types
of coll.
sourceraw docstring

take-untilclj

(take-until pred)
(take-until pred coll)

Like clojure.core/take-while, except inverted pred.

Like clojure.core/take-while, except inverted pred.
sourceraw docstring

take-uptoclj

(take-upto pred)
(take-upto pred coll)

Returns a lazy sequence of successive items from coll up to and including the first item for which (pred item) returns true.

Returns a lazy sequence of successive items from coll up to and including
the first item for which `(pred item)` returns true.
sourceraw docstring

tapclj

(tap f)
(tap f coll)

A transducer that applies side-effects to each element.

A transducer that applies side-effects to each element.
sourceraw docstring

templateclj

(template text context)

A simple string templating function that replaces {x.y.z} placeholders with values from the context.

A simple string templating function that replaces {x.y.z} placeholders
with values from the context.
sourceraw docstring

timingcljmacro

(timing & body)

Returns a vector of [millis-taken result]

Returns a vector of [millis-taken result]
sourceraw docstring

togethercljmacro

(together & expressions)

Executes each top level form in body concurrently and returns a sequence of the results.

Executes each top level form in body concurrently and returns
a sequence of the results.
sourceraw docstring

touchclj

(touch x)

Realizes all delays within a structure.

Realizes all delays within a structure.
sourceraw docstring

touch-realizedclj

(touch-realized x)

Unwraps all realized delays within a structure.

Unwraps all realized delays within a structure.
sourceraw docstring

tree-seq-bfclj

(tree-seq-bf branch? children root)

Like clojure.core/tree-seq, but breadth first.

Like clojure.core/tree-seq, but breadth first.
sourceraw docstring

trieclj

(trie coll)

Returns a trie structure as a map. coll must be a collection of sequentials.

Returns a trie structure as a map. coll must be a collection
of sequentials.
sourceraw docstring

trie-byclj

(trie-by f coll)

Returns a trie structure as a map. f is a function of an element in coll that returns an ordered sequence by which the element will be positioned in the trie.

Returns a trie structure as a map. f is a function
of an element in coll that returns an ordered sequence
by which the element will be positioned in the trie.
sourceraw docstring

try-rootcljmacro

(try-root & body)

Used just like the special form try, except pulls out the root cause and catches on that instead of whatever exception might wrap it. Useful for catching exceptions surrounding futures and the like.

Used just like the special form try, except pulls out the root
cause and catches on that instead of whatever exception might
wrap it. Useful for catching exceptions surrounding futures and
the like.
sourceraw docstring

tuxtclj

(tuxt & fns)

Returns a new function that applies each fn against respective positions in a tuple.

Returns a new function that applies each fn against respective positions in a tuple.
sourceraw docstring

update!clj

(update! m k f)
(update! m k f x)
(update! m k f x y)
(update! m k f x y z)
(update! m k f x y z & more)

Like clojure.core/update but for transients.

Like clojure.core/update but for transients.
sourceraw docstring

uuidclj

(uuid)

Get a uuid as string

Get a uuid as string
sourceraw docstring

walk-keysclj

(walk-keys f form)

Applies f to all keys in all maps within form.

Applies f to all keys in all maps within form.
sourceraw docstring

walk-seqclj

(walk-seq form)

Returns a lazy depth-first sequence of all forms within a data structure.

Returns a lazy depth-first sequence of all forms within a data structure.
sourceraw docstring

walk-seq-bfclj

(walk-seq-bf form)

Returns a lazy breadth-first sequence of all forms within a data structure.

Returns a lazy breadth-first sequence of all forms within a data structure.
sourceraw docstring

walk-valsclj

(walk-vals f form)

Applies f to all vals in all maps within form.

Applies f to all vals in all maps within form.
sourceraw docstring

weakly-memoizeclj

(weakly-memoize f)
(weakly-memoize f cache-key-fn)

Returns a memoized version of f with weak retention of return values. As long as a strong reference to the return value remains, further invocations with the same cache key will return the cached value. However, once no strong references to the value are retained the value will become a candidate for garbage collection and a future invocation with the same arguments will necessarily recompute f.

The cache key defaults to the arguments provided but a custom cache-key-fn may be supplied instead. A cache-key-fn is a function that will be invoked with the sequence of arguments and should return the desired cache key.

Returns a memoized version of f with weak retention of return values.
As long as a strong reference to the return value remains, further
invocations with the same cache key will return the cached value.
However, once no strong references to the value are retained the
value will become a candidate for garbage collection and a future
invocation with the same arguments will necessarily recompute f.

The cache key defaults to the arguments provided but a custom
cache-key-fn may be supplied instead. A cache-key-fn is a function
that will be invoked with the sequence of arguments and should return
the desired cache key.
sourceraw docstring

when-let*cljmacro

(when-let* bindings & body)

Like clojure.core/when-let except supports multiple bindings.

Like clojure.core/when-let except supports multiple bindings.
sourceraw docstring

when-seqcljmacro

(when-seq bindings & body)

Like if-seq but there's only one branch with an implicit do

Like if-seq but there's only one branch with an implicit do
sourceraw docstring

when-some*cljmacro

(when-some* bindings & body)

Like clojure.core/when-some except supports multiple bindings.

Like clojure.core/when-some except supports multiple bindings.
sourceraw docstring

when-textcljmacro

(when-text bindings & body)

Like if-text but there's only one branch with an implicit do

Like if-text but there's only one branch with an implicit do
sourceraw docstring

with-temp-filescljmacro

(with-temp-files symbols & body)

Binds temporary files to each symbol in the symbols vector and then executes body using those bindings. All bound temporary files are deleted before returning with the return value of body.

Binds temporary files to each symbol in the symbols vector and
then executes body using those bindings. All bound temporary
files are deleted before returning with the return value of body.
sourceraw docstring

with-timeoutcljmacro

(with-timeout millis & body)

Run body on a separate thread subject to a timeout. If reaches timeout a vector of [false nil] will be returned, otherwise [true result]

Run body on a separate thread subject to a timeout. If reaches timeout
a vector of [false nil] will be returned, otherwise [true result]
sourceraw docstring

zipclj

(zip & colls)

Create tuples from sequences.

Create tuples from sequences.
sourceraw docstring

|intersection|clj

(|intersection| s)
(|intersection| s1 s2)

Computes the cardinality of the intersection.

Computes the cardinality of the intersection.
sourceraw docstring

|union|clj

(|union| s)
(|union| s1 s2)

Computes the cardinality of the union.

Computes the cardinality of the union.
sourceraw docstring

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

× close