Skip to content

Operations and callable forms

W emits ordered Definitions. FW defines a named function using Func metadata and ordered Operations; BW forms an anonymous synchronous closure. The templates own Rust function/closure punctuation, while preparation validates signature records and forwards explicit children. They add no implicit move, cloning or implementation block. An FW may return a composed CV future through its existing output signature.

FW requires a nonempty name and named, typed input Props. BW requires typed input Props too; it does not expose general inferred-parameter syntax. Inputs permit Key/Type, not supplied Value, StructTags or unknown fields. Flat signature metadata and an explicit Func record are exclusive. Func has Key, Inputs, Outputs and Receiver, but a retained field does not mean every form consumes it.

Omitted or empty Outputs omit the entire return annotation. A named function then returns unit; a closure uses Rust's output inference. Explicit outputs preserve their existing parenthesized punctuation, including native types named Void. The absence sentinel differs from supplied native String Void.

The typed flat, typed record, output and Void output cases witness those boundaries. Unit mismatch intentionally produces E0308, proving that omitted output metadata does not cause a hidden return-type repair.

Named KY consumes its Key and Inputs, with no callable child. Absent Receiver emits Key(Inputs); a supplied nonblank Receiver emits Receiver.Key(Inputs). Empty/whitespace Receiver rejects. Native Key/Receiver named Void remain actual native data.

Unnamed KY requires exactly one BW child and no Receiver. BW is allowed only directly under KY or KO/KOB, within enclosing callable scope. KO/KOB assign or bind the resulting closure. Rust infers BW captures; BW has no Capture input. CV has its own local capture policy. Receiver methods, FWC/KYC and general ownership analysis are outside these witnesses.

The inline closure, stored borrowed capture, named invocation and Void invocation are complete compile-only examples. Their canonical AML is not L source syntax.

FW may declare glyph-local Lifetimes/GenericTypes; named KY may apply them to the final path component. BW and anonymous KY cannot. These native String interiors belong to metadata, not an L closure/generics API. Trait signatures have a separate MY contract.

See Operation, Operate, callable validation, and the maintained callable contract.