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