Shell:FunctionPrototype
Compile a typed function.
Pipeline callback receiving borrowed text from standard input and returning text to print to standard output. The input is valid only during invocation.
Syntax
[<name:id>] "(" <parameters:raw> ")" "->" <result:qualified-id> [<body:block>]Example
fn add(a:i64, b:i64) -> i64 { return a + b }Arguments
- —
- : —
- body — Statements in braces. return supplies the result.
- parameters — Comma-separated name:type pairs; leave empty for no parameters.
- result — Return type; use void when no value is returned.