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