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