diff options
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 |
