Basic constructor macro for bin-expo structures.
(make-bin-expo [:prefix <prefix>] [:sign? <sign?>] [:digits <digits>])
This is the usual way to construct bin-expo structures. It simply conses together a structure with the specified fields.
This macro generates a new bin-expo structure from scratch. See also change-bin-expo, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-bin-expo (&rest args) (std::make-aggregate 'bin-expo args '((:prefix) (:sign?) (:digits)) 'make-bin-expo nil))
Function:
(defun bin-expo (prefix sign? digits) (declare (xargs :guard (and (bin-expo-prefixp prefix) (sign-optionp sign?) (dec-digit-char-listp digits)))) (declare (xargs :guard t)) (let ((__function__ 'bin-expo)) (declare (ignorable __function__)) (b* ((prefix (mbe :logic (bin-expo-prefix-fix prefix) :exec prefix)) (sign? (mbe :logic (sign-option-fix sign?) :exec sign?)) (digits (mbe :logic (str::dec-digit-char-list-fix digits) :exec digits))) (list (cons 'prefix prefix) (cons 'sign? sign?) (cons 'digits digits)))))