diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-07-12 11:43:56 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-07-12 11:43:56 -0400 |
| commit | f1773b4959a35f28b37617f775f4fc1683e4f654 (patch) | |
| tree | 9a7188c386d117d198e818087b04f180942c36ae /docs/type_system/function.md | |
| parent | 5fadfba312fcd0367a3341c5d194b7955627c177 (diff) | |
function types
Diffstat (limited to 'docs/type_system/function.md')
| -rw-r--r-- | docs/type_system/function.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/type_system/function.md b/docs/type_system/function.md index 76430a5..129411c 100644 --- a/docs/type_system/function.md +++ b/docs/type_system/function.md @@ -76,6 +76,10 @@ Invoked regular expression matcher # Returning +## Return Type Inference + +If a return type is not specified it is inferred a type checking time + ## \`return The return operation type is Void with the `%return` qualifier @@ -83,7 +87,6 @@ The return operation type is Void with the `%return` qualifier ```text %return Void ``` - This qualifier is used when type checking branches that should return value, indicating this branch is valid ## Transient Union Return Chaining @@ -97,7 +100,7 @@ Yielding wraps the value in the transient union `Iteration` Return `Void` to stop iteration ```text -fn : ([n] @ 1 < n {[x] `yield 2 * x; n +: 1 } ) +fn : ([I64.n] @ 1 < n {[x] `yield 2 * x; n +: 1 } ) it : fn `sync 10 // invoking @ it {[v] `log v } // 2 4 6 8 10 12 14 16 18 20 @@ -136,3 +139,7 @@ fn `sync args // can be turned into `await fn `async args # Binding ## \`bind + +# Type Inference + +The argument types of anonymous functions passed as an argument can be inhered |
