Liking cljdoc? Tell your friends :D

sicmutils.structure


compatible-shapeclj/s

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

componentclj/s

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

dimensionclj/s

(dimension s)

downclj/s

(down & xs)

Construct a down (covariant) tuple from the arguments.

Construct a down (covariant) tuple from the arguments.
raw docstring

flip-indicesclj/s

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

generateclj/s

(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)
raw docstring

maprclj/s

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

oppositeclj/s

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

orientationclj/s

(orientation s)

Return the orientation of s, either ::up or ::down.

Return the orientation of s, either ::up or ::down.
raw docstring

sameclj/s

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

structure->access-chainsclj/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).
raw docstring

structure->vectorclj/s

(structure->vector s)

Return the structure in unoriented vector form.

Return the structure in unoriented vector form.
raw docstring

structure-assoc-inclj/s

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

structure?clj/s

(structure? s)

True if s is a structure.

True if s is a structure.
raw docstring

unflattenclj/s

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

upclj/s

(up & xs)

Construct an up (contravariant) tuple from the arguments.

Construct an up (contravariant) tuple from the arguments.
raw docstring

up?clj/s

(up? s)

True if s in an up structure.

True if s in an up structure.
raw docstring

vector->downclj/s

(vector->down v)

Form a down-tuple from a vector.

Form a down-tuple from a vector.
raw docstring

vector->upclj/s

(vector->up v)

Form an up-tuple from a vector.

Form an up-tuple from a vector.
raw docstring

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

× close