Parse and normalize a defnz signature vector into boundary-contract
data. Pure: a vector goes in, a normalized map comes out, or a
structured diagnostic is thrown.
A signature pairs argument bindings with boundary types and ends with
a required final :ret marker and its return type:
[x :i64
y :i64
:ret :i64]
normalizes to:
{:args [{:binding x :type :i64}
{:binding y :type :i64}]
:ret :i64}
Type forms are preserved verbatim; clj-zig.type normalizes them. A map
binding carries Clojure-side destructuring that lowers to native
scalars before the call; its argument is marked
:destructured? true.
Parse and normalize a `defnz` signature vector into boundary-contract
data. Pure: a vector goes in, a normalized map comes out, or a
structured diagnostic is thrown.
A signature pairs argument bindings with boundary types and ends with
a required final `:ret` marker and its return type:
[x :i64
y :i64
:ret :i64]
normalizes to:
{:args [{:binding x :type :i64}
{:binding y :type :i64}]
:ret :i64}
Type forms are preserved verbatim; `clj-zig.type` normalizes them. A map
binding carries Clojure-side destructuring that lowers to native
scalars before the call; its argument is marked
`:destructured? true`.(normalize signature)Normalize a defnz signature vector to {:args [...] :ret <type>}.
Throws a diagnostic (ex-info) when the shape is invalid.
Normalize a `defnz` signature vector to `{:args [...] :ret <type>}`.
Throws a diagnostic (`ex-info`) when the shape is invalid.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |