summaryrefslogtreecommitdiff
path: root/docs/type_system
diff options
context:
space:
mode:
Diffstat (limited to 'docs/type_system')
-rw-r--r--docs/type_system/empty.md2
-rw-r--r--docs/type_system/function.md11
2 files changed, 10 insertions, 3 deletions
diff --git a/docs/type_system/empty.md b/docs/type_system/empty.md
index 5903c19..9466493 100644
--- a/docs/type_system/empty.md
+++ b/docs/type_system/empty.md
@@ -11,7 +11,7 @@ Container type can be null
## Use with `Result` Union
```text
-make_array : ([yes]
+make_array : ([Bool.yes]
? yes {
`value Array $ (1; 2; 3)
`null
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