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