Liking cljdoc? Tell your friends :D
Clojure only.

missing.core


*preempt*clj


=icclj

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

Like = but ignores casing.

Like = but ignores casing.
raw docstring

=selectclj

(=select expected & actuals)

Checks data at only the positions referred to by expected. If a leaf of expected is a function, then that function will be tested with the value found in actual, otherwise equality will be used.

Checks data at only the positions referred to by expected. If a leaf
of expected is a function, then that function will be tested with the
value found in actual, otherwise equality will be used.
raw 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?
raw docstring

ascending?clj

(ascending? coll)
(ascending? comparator coll)

Is coll ascending according to the supplied comparator?

Is coll ascending according to the supplied comparator?
raw 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'
raw docstring

assoc*-inclj

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

Like assoc-in but with assoc* semantics.

Like assoc-in but with assoc* semantics.
raw 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.
raw 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.
raw 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.
raw docstring

base64->bytesclj

(base64->bytes b64)

Converts a base64 encoded string into a byte array.

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

basenameclj

(basename filename)

Get the filename (without extension) from a filename

Get the filename (without extension) from a filename
raw 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.
raw 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.
raw docstring

bytes->base64clj

(bytes->base64 bites)

Converts a byte array into a base64 encoded string.

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

bytes->hexclj

(bytes->hex bites)

Converts a byte array into a hex encoded string.

Converts a byte array into a hex encoded string.
raw 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'.
raw docstring

concatvclj

(concatv & xs)

Returns the concatenation as a vector.

Returns the concatenation as a vector.
raw docstring

contains-all?clj

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

Does coll contain every key?

Does coll contain every key?
raw 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.
raw 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.
raw docstring

deep-mergeclj

(deep-merge & maps)

Merges nested maps.

Merges nested maps.
raw 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.
raw docstring

defmemocljmacro

(defmemo & defnargs)

Define a function with a memoized implementation.

Define a function with a memoized implementation.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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?
raw docstring

descending?clj

(descending? coll)
(descending? comparator coll)

Is coll descending according to the supplied comparator?

Is coll descending according to the supplied comparator?
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

extremaclj

(extrema coll)

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

Returns a tuple of [smallest largest] element in the collection.
raw 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.
raw docstring

filter-entriesclj

(filter-entries pred m)

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.
raw 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
raw 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.
raw 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
raw 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.
raw 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.
raw docstring

find-firstcljdeprecated

(find-first pred coll)

Deprecated, use missing.core/seek instead.

Deprecated, use missing.core/seek instead.
raw docstring

find-indexedcljdeprecated

(find-indexed pred coll)

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

Returns [index item] for the first item that matches pred.
raw 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.
raw 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.
raw docstring

flatten1clj

(flatten1 coll)

Flattens one level of nested collections.

Flattens one level of nested collections.
raw 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.
raw 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.
raw docstring

get-extensionclj

(get-extension filename)

Get the file extension from a filename.

Get the file extension from a filename.
raw 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.
raw docstring

get-filenamecljdeprecated

(get-filename filename)

Get the filename (without extension) from a filename

Get the filename (without extension) from a filename
raw 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*.
raw docstring

get-jar-versionclj


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.
raw 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.
raw docstring

greatestclj

(greatest coll)

Returns the largest element in the collection.

Returns the largest element in the collection.
raw 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
raw docstring

group-by-labelsclj

(group-by-labels f coll)

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

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

groupcat-byclj

(groupcat-by f coll)

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

Like group-by except f is allowed to return a sequence of keys
that the element should be bucketed by.
raw 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.
raw docstring

gtclj

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

Like > but for comparables.

Like > but for comparables.
raw docstring

gteclj

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

Like >= but for comparables.

Like >= but for comparables.
raw docstring

hex->bytesclj

(hex->bytes hex)

Converts a hex encoded string into a byte array.

Converts a hex encoded string into a byte array.
raw 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.
raw docstring

if-seqcljmacro

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

bindings => binding-form test

If (seq test) is non-nil evaluates then with binding-form bound to the value of test, if not, yields else

bindings => binding-form test

If (seq test) is non-nil evaluates then with binding-form bound to the
value of test, if not, yields else
raw 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.
raw docstring

if-textcljmacro

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

bindings => binding-form test

If test is a string and contains text, evaluates then with binding-form bound to the value of test, if not, yields else

bindings => binding-form test

If test is a string and contains text, evaluates then with binding-form bound to the
value of test, if not, yields else
raw 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
raw 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
raw docstring

indexcat-byclj

(indexcat-by f coll)

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

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

indexedclj

(indexed coll)

Creates a [index item] seq of tuples.

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

intersect?clj

(intersect? s1 s2 & ss)

Returns true if the provided collections overlap.

Returns true if the provided collections overlap.
raw docstring

iterable?clj

(iterable? x)

Is collection like or a single value?

Is collection like or a single value?
raw 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.
raw 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.
raw 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.
raw docstring

keep-keysclj

(keep-keys f m)

Map and only keep non-nil keys.

Map and only keep non-nil keys.
raw docstring

keep-valsclj

(keep-vals f m)

Map and only keep non-nil values.

Map and only keep non-nil values.
raw docstring

keepcatclj

(keepcat f)
(keepcat f & colls)

A transducer like mapcat except removes nil elements.

A transducer like mapcat except removes nil elements.
raw 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
raw 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.
raw docstring

keysetclj

(keyset m)

Returns the keys of a map as a set.

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

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.
raw docstring

leastclj

(least coll)

Returns the smallest element in the collection.

Returns the smallest element in the collection.
raw 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
raw 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.
raw 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.
raw 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)
raw 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.
raw docstring

llastclj

(llast coll)

The complement to clojure.core/ffirst.

The complement to clojure.core/ffirst.
raw 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.
raw 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
raw docstring

lstripclj

(lstrip s strip)

Strip a prefix from a string.

Strip a prefix from a string.
raw docstring

ltclj

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

Like < but for comparables.

Like < but for comparables.
raw docstring

lteclj

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

Like <= but for comparables.

Like <= but for comparables.
raw docstring

map-entriesclj

(map-entries f m)

Transform the entries of a map

Transform the entries of a map
raw 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.
raw 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.
raw docstring

map-keysclj

(map-keys f m)

Transform the keys of a map

Transform the keys of a map
raw 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.
raw docstring

map-valsclj

(map-vals f m)

Transform the values of a map

Transform the values of a map
raw 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.
raw 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.
raw 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.
raw 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)
raw 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.
raw 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.
raw 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?
raw docstring

norcljmacro

(nor & more)

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

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

not-blank?clj

(not-blank? s)

not-empty?clj

(not-empty? coll)

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.
raw 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?
raw 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.
raw 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.
raw docstring

parse-best-guessclj

(parse-best-guess s)

parse-booleanclj

(parse-boolean s)

parse-numberclj

(parse-number s)

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.
raw 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)`.
raw 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.
raw 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.
raw docstring

pmapcatclj

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

Like pmap, but for mapcatting.

Like pmap, but for mapcatting.
raw docstring

polling-atomclj

(polling-atom freq f)
(polling-atom init freq f)
(polling-atom reducer init freq f)

Returns an atom backed by background polling of a function. Change the value of the atom to :stop in order to halt the polling process. Exceptions during the invocation of the process log but will not mutate the value. Supply your own reducer to combine results of successive polls.

Returns an atom backed by background polling of a function. Change
the value of the atom to :stop in order to halt the polling process.
Exceptions during the invocation of the process log but will not mutate
the value. Supply your own reducer to combine results of successive polls.
raw docstring

ppclj

(pp x)

Prints the argument and returns it.

Prints the argument and returns it.
raw 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.
raw 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.
raw 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
raw 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.
raw docstring

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.
raw 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.
raw 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.
raw 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
raw 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
raw docstring

reset-var!clj

(reset-var! v value)

Sets the root value of a var.

Sets the root value of a var.
raw 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.
raw 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.
raw 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.
raw docstring

reverse-mapclj

(reverse-map m)

Invert a map

Invert a map
raw 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.
raw docstring

rstripclj

(rstrip s strip)

Strip a suffix from a string.

Strip a suffix from a string.
raw docstring

run-par!clj

(run-par! f coll)

Like run! but executes each element concurrently.

Like run! but executes each element concurrently.
raw 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 and 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 and you should always use indexed data
structures instead of multiple seeks over the same data.
raw 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.
raw docstring

single?clj

(single? x)

Is this a collection of a single value?

Is this a collection of a single value?
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

stringify-keyclj

(stringify-key k)

Convert a keyword to a string, preserve namespaces.

Convert a keyword to a string, preserve namespaces.
raw docstring

stringify-keysclj

(stringify-keys form)

Convert all keys in all maps within form into a string, preserves namespaces.

Convert all keys in all maps within form into a string, preserves namespaces.
raw docstring

submap?clj

(submap? m1 m2)

Is m1 a submap of m2?

Is m1 a submap of m2?
raw docstring

submapsclj

(submaps m)

Returns all the submaps of a map

Returns all the submaps of a map
raw docstring

subsetsclj

(subsets coll)

Returns all the subsets of a collection

Returns all the subsets of a collection
raw docstring

supermap?clj

(supermap? m1 m2)

Is m1 a supermap of m2?

Is m1 a supermap of m2?
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

timingcljmacro

(timing & body)

Returns a vector of [millis-taken result]

Returns a vector of [millis-taken result]
raw 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.
raw docstring

touchclj

(touch x)

Realizes all delays within a structure.

Realizes all delays within a structure.
raw docstring

touch-realizedclj

(touch-realized x)

Unwraps all realized delays within a structure.

Unwraps all realized delays within a structure.
raw 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.
raw 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.
raw docstring

uniqueifierclj

(uniqueifier)

Returns a function that will always produce a unique name for any provided name. The first time it will be the name as-is and subsequent calls will append some count. You're guaranteed that the range of the produced function has zero duplicates. When these names are filenames the number is appended conveniently before the extension.

Returns a function that will always produce a unique name
for any provided name. The first time it will be the name as-is
and subsequent calls will append some count. You're guaranteed that
the range of the produced function has zero duplicates. When these
names are filenames the number is appended conveniently before the extension.
raw docstring

uuidclj

(uuid)

Get a uuid as string

Get a uuid as string
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

when-seqcljmacro

(when-seq bindings & body)

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.
raw docstring

when-textcljmacro

(when-text bindings & body)

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]
raw docstring

zipclj

(zip & colls)

Create tuples from sequences.

Create tuples from sequences.
raw docstring

|intersection|clj

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

Computes the cardinality of the intersection.

Computes the cardinality of the intersection.
raw docstring

|union|clj

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

Computes the cardinality of the union.

Computes the cardinality of the union.
raw docstring

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

× close