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