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

=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.
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*-inclj

(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

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

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

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

find-firstcljdeprecated

(find-first pred coll)

Deprecated, use missing.core/seek instead.

Deprecated, use missing.core/seek instead.
sourceraw 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.
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-filenamecljdeprecated

(get-filename filename)

Get the filename (without extension) from a filename

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

indexedclj

(indexed coll)

Creates a [index item] seq of tuples.

Creates a [index item] seq of tuples.
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

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

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

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

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-booleanclj

(parse-boolean s)
source

parse-numberclj

(parse-number s)
source

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

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

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 pmap, but for mapcatting.

Like pmap, but for mapcatting.
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

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

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 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.
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-keyclj

(stringify-key k)

Convert a keyword to a string, preserve namespaces.

Convert a keyword to a string, preserve namespaces.
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

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

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

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

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)
source

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)
source

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