Generic utility functions.
Generic utility functions.
(assoc-tag sym t)Associate a type tag to a symbol's metadata.
Associate a type tag to a symbol's metadata.
(filter-map pred m)Filter map entries based on a predicate applied to values.
Return a new map containing only the entries where (pred value) returns true.
Filter map entries based on a predicate applied to values. Return a new map containing only the entries where (pred value) returns true.
(postwalk f form)Performs a depth-first, post-order traversal of form. Calls f on each sub-form, uses f's return value in place of the original. Recognizes all Clojure data structures. Consumes seqs as with doall.
Performs a depth-first, post-order traversal of form. Calls f on each sub-form, uses f's return value in place of the original. Recognizes all Clojure data structures. Consumes seqs as with doall.
(reduce-double-vector f init v)Reduce a double primitive value over a vector.
Reduce a double primitive value over a vector.
(spy msg x)Debug helper: print message and value, return value.
Debug helper: print message and value, return value.
(trunc x)Round towards zero to an integeral value.
Round towards zero to an integeral value.
(update-vals m f)m f => {k (f v) ...}
Given a map m and a function f of 1-argument, returns a new map where the keys of m are mapped to result of applying f to the corresponding values of m.
m f => {k (f v) ...}
Given a map m and a function f of 1-argument, returns a new map where
the keys of m are mapped to result of applying f to the corresponding
values of m.(walk 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.
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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |