Basic constructor macro for pnumber-dot-digit structures.
(make-pnumber-dot-digit [:digit <digit>])
This is the usual way to construct pnumber-dot-digit structures. It simply conses together a structure with the specified fields.
This macro generates a new pnumber-dot-digit structure from scratch. See also change-pnumber-dot-digit, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-pnumber-dot-digit (&rest args) (std::make-aggregate 'pnumber-dot-digit args '((:digit)) 'make-pnumber-dot-digit nil))
Function:
(defun pnumber-dot-digit (digit) (declare (xargs :guard (characterp digit))) (declare (xargs :guard (dec-digit-char-p digit))) (b* ((digit (mbe :logic (acl2::char-fix digit) :exec digit))) (let ((digit (mbe :logic (if (dec-digit-char-p digit) digit #\0) :exec digit))) (cons :dot-digit (list digit)))))