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