Basic constructor macro for value-array structures.
(make-value-array [:elemtype <elemtype>] [:elements <elements>])
This is the usual way to construct value-array structures. It simply conses together a structure with the specified fields.
This macro generates a new value-array structure from scratch. See also change-value-array, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-value-array (&rest args) (std::make-aggregate 'value-array args '((:elemtype) (:elements)) 'make-value-array nil))
Function:
(defun value-array (elemtype elements) (declare (xargs :guard (and (typep elemtype) (value-listp elements)))) (declare (xargs :guard (consp elements))) (let ((__function__ 'value-array)) (declare (ignorable __function__)) (b* ((elemtype (mbe :logic (type-fix elemtype) :exec elemtype)) (elements (mbe :logic (value-list-fix elements) :exec elements))) (let ((elements (mbe :logic (if (consp elements) elements (list (value-fix :irrelevant))) :exec elements))) (cons :array (list elemtype elements))))))