Liking cljdoc? Tell your friends :D

pattern.util


all-equiv?clj

(all-equiv? mode)
(all-equiv? datum orig-env done env)

For use as the equiv? argument in rule combinators.

Data, metadata on the data, and env must all be equal.

In :no-env mode, ignore env difference.

See also equiv?

For use as the equiv? argument in rule combinators.

Data, metadata on the data, and env must all be equal.

In :no-env mode, ignore env difference.

See also [[equiv?]]
raw docstring

arrayseq?clj

(arrayseq? x)

Returns true if the object is any sort of non-empty Java Array.

Will return false if the array is empty.

This may still need to be extened to be complete.

Returns true if the object is any sort of non-empty Java Array.

Will return false if the array is empty.

This may still need to be extened to be complete.
raw docstring

build-collclj

(build-coll orig children)

collection?clj

(collection? x)

Is x a sequential collection, a map or a map-entry?

Is x a sequential collection, a map or a map-entry?
raw docstring

equiv?clj

(equiv? mode)
(equiv? datum orig-env done env)

For use as the equiv? argument in rule combinators.

Data and env should be equal, but ignore metadata.

In :no-env mode, just look at data, ignore both env and metadata.

See also all-equiv?

For use as the equiv? argument in rule combinators.

Data and env should be equal, but ignore metadata.

In :no-env mode, just look at data, ignore both env and metadata.

See also [[all-equiv?]]
raw docstring

find-inclj

(find-in [idx & path] form)

Like get-in, but works with non-indexed collections, too.

Also handles :map/key in path that returns the actual key element from the collection. The actual key may have different metadata than the value used to look it up.

Like get-in, but works with non-indexed collections, too.

Also handles :map/key in path that returns the actual key element from the
collection. The actual key may have different metadata than the value used to
look it up.
raw docstring

ints?clj

(ints? x)

Return true if x is an int array

The Java byte-array / bytes? type is signed. That makes a mess, so we use ints.

Return true if x is an int array

The Java byte-array / bytes? type is signed. That makes a mess, so we use ints.
raw docstring

listy?clj

(listy? x)

Returns true if x is any kind of list except a vector.

Returns true if x is any kind of list except a vector.
raw docstring

macroexpand-allclj

(macroexpand-all form)

Recursively performs all possible macroexpansions in form.

Recursively performs all possible macroexpansions in form.
raw docstring

make-zipperclj

(make-zipper x)

Make a zipper that will descend into any type of sequential objects except maps.

Make a zipper that will descend into any type of sequential objects except maps.
raw docstring

make-zipper+mapclj

(make-zipper+map x)

Make a zipper that will descend into any type of sequential objects, including maps.

Make a zipper that will descend into any type of sequential objects,
including maps.
raw docstring

map->sortedclj

(map->sorted x)

meta-equiv?clj

(meta-equiv? mode)
(meta-equiv? datum orig-env done env)

For use as the equiv? argument in rule combinators.

metadata and env must be equal.

In :no-env mode, ignore env difference.

See also equiv?

For use as the equiv? argument in rule combinators.

metadata and env must be equal.

In :no-env mode, ignore env difference.

See also [[equiv?]]
raw docstring

meta=clj

(meta= a b)

Returns true if the metadata attached to a is equal to the metadata attached to b.

Returns true if the metadata attached to a is equal to the metadata attached to b.
raw docstring

meta?clj

(meta? x)

Returns true if the object supports attaching metadata via with-meta.

Returns true if the object supports attaching metadata via with-meta.
raw docstring

postwalk-replace-with-metaclj

(postwalk-replace-with-meta smap form)

Like [[postwalk-replace]] but preserves metadata

Like [[postwalk-replace]] but preserves metadata
raw docstring

postwalk-with-metaclj

(postwalk-with-meta f form)

Like [[postwalk]] but copies source metadata to the result.

Like [[postwalk]] but copies source metadata to the result.
raw docstring

postwalk-with-pathsclj

(postwalk-with-paths f form)
(postwalk-with-paths f path form)

Performs a depth-first, post-order traversal of form. Calls (f idx subform) on each sub-form, uses f's return value in place of the original. Recognizes all Clojure data structures. Consumes seqs as with doall.

See [[clojure.walk/postwalk]] and walk-with-paths.

Performs a depth-first, post-order traversal of form.  Calls (f idx subform)
on each sub-form, uses f's return value in place of the original.
Recognizes all Clojure data structures. Consumes seqs as with doall.

See [[clojure.walk/postwalk]] and [[walk-with-paths]].
raw docstring

prewalk-unquotedclj

(prewalk-unquoted f form)

Like postwalk, but does pre-order traversal.

Like postwalk, but does pre-order traversal.
raw docstring

strip-metaclj

(strip-meta form)

Recursively remove all metadata from the given form.

Useful to prevent exponential growth through inclusion of metadata in metadata.

Recursively remove all metadata from the given form.

Useful to prevent exponential growth through inclusion of metadata in metadata.
raw docstring

time->cljmacro

(time-> data & forms)

A simple macro for timing a sequence of operations to see where the time is going.

A simple macro for timing a sequence of operations to see where the time is going.
raw docstring

time->>cljmacro

(time->> data & forms)

A simple macro for timing a sequence of operations to see where the time is going.

A simple macro for timing a sequence of operations to see where the time is going.
raw docstring

walk-unquotedclj

(walk-unquoted inner outer form)

Traverses form, an arbitrary data structure. inner and outer are functions. Applies inner to each element of form, building up a data structure of the same type, then applies outer to the result. Recognizes all Clojure data structures. Consumes seqs as with doall.

Unlike clojure.walk/walk, does not traverse into quoted forms.

Traverses form, an arbitrary data structure.  inner and outer are
functions.  Applies inner to each element of form, building up a
data structure of the same type, then applies outer to the result.
Recognizes all Clojure data structures. Consumes seqs as with doall.

Unlike clojure.walk/walk, does not traverse into quoted forms.
raw docstring

walk-with-metaclj

(walk-with-meta inner outer form)

Same as clojure.walk/walk, but preserves metadata.

Same as clojure.walk/walk, but preserves metadata.
raw docstring

walk-with-pathsclj

(walk-with-paths inner outer path form)

Like [[clojure.walk/walk]] got combined with [[map-indexed]]. Calls [[(inner idx element)]] and [[(outer idx element)]] where idx is a vector that can be used with functions like [[get-in]] or [[update-in]]

Map keys are given the path to the map with :map/key appended. For instance, when the traversing the below map gets to the :k element, the callbacks would be called as shown:

[_ {:x [{:k :v}]}]

(inner [1 :x 0 :key] :k)

Like [[clojure.walk/walk]] got combined with [[map-indexed]]. Calls
[[(inner idx element)]] and [[(outer idx element)]] where idx is a vector that
can be used with functions like [[get-in]] or [[update-in]]

Map keys are given the path to the map with :map/key appended. For instance, when
the traversing the below map gets to the :k element, the callbacks would be called
as shown:

  [_ {:x [{:k :v}]}]

  (inner [1 :x 0 :key] :k)
raw docstring

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

× close