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