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