(compatible-shape s)
Return an object compatible for multiplication with the given one, with the slots filled with gensyms.
Return an object compatible for multiplication with the given one, with the slots filled with gensyms.
(component & indices)
Given an access chain (a sequence of indices), return a function of structures that will retrieve that corresponding element.
Given an access chain (a sequence of indices), return a function of structures that will retrieve that corresponding element.
(down & xs)
Construct a down (covariant) tuple from the arguments.
Construct a down (covariant) tuple from the arguments.
(flip-indices s)
Make a tuple with the same shape as s but all orientations inverted.
Make a tuple with the same shape as s but all orientations inverted.
(generate dimension orientation f)
Generate a structure with the given orientation whose elements are (f i) where i ranges from [0..dimension)
Generate a structure with the given orientation whose elements are (f i) where i ranges from [0..dimension)
(mapr f & structures)
Return a structure with the same shape as s but with f applied to each primitive (that is, not structural) component.
Return a structure with the same shape as s but with f applied to each primitive (that is, not structural) component.
(opposite s xs)
Make a tuple containing xs with the orientation opposite to s.
Make a tuple containing xs with the orientation opposite to s.
(orientation s)
Return the orientation of s, either ::up or ::down.
Return the orientation of s, either ::up or ::down.
(same s xs)
Make a tuple containing xs with the same orientation as s.
Make a tuple containing xs with the same orientation as s.
(structure->access-chains s)
Return a structure of the same shape as s whose elements are access chains corresponding to position of each element (i.e., the sequence of indices needed to address that element).
Return a structure of the same shape as s whose elements are access chains corresponding to position of each element (i.e., the sequence of indices needed to address that element).
(structure->vector s)
Return the structure in unoriented vector form.
Return the structure in unoriented vector form.
(structure-assoc-in s [k & ks] value)
Like assoc-in, but works for structures. At this writing we're not sure if we want to overwrite the stock definition of assoc-in to something that would fall through for standard clojure data types
Like assoc-in, but works for structures. At this writing we're not sure if we want to overwrite the stock definition of assoc-in to something that would fall through for standard clojure data types
(unflatten values struct)
(unflatten constructor values struct)
Given a sequence of values and a model structure, unpack the values into a structure with the same shape as the model.
Given a sequence of values and a model structure, unpack the values into a structure with the same shape as the model.
(up & xs)
Construct an up (contravariant) tuple from the arguments.
Construct an up (contravariant) tuple from the arguments.
(vector->down v)
Form a down-tuple from a vector.
Form a down-tuple from a vector.
(vector->up v)
Form an up-tuple from a vector.
Form an up-tuple from a vector.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close