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