diff options
Diffstat (limited to 'docs/type_system')
| -rw-r--r-- | docs/type_system/buffer.md | 2 | ||||
| -rw-r--r-- | docs/type_system/empty.md | 2 | ||||
| -rw-r--r-- | docs/type_system/function.md | 2 | ||||
| -rw-r--r-- | docs/type_system/union.md | 20 |
4 files changed, 12 insertions, 14 deletions
diff --git a/docs/type_system/buffer.md b/docs/type_system/buffer.md index dca8ab9..f351b4f 100644 --- a/docs/type_system/buffer.md +++ b/docs/type_system/buffer.md @@ -38,6 +38,8 @@ Array[Generic.T] `alias Buffer[[TYPE] Generic.T] ## ``pop` +## ``reverse` + ## ``join` ## ``split` diff --git a/docs/type_system/empty.md b/docs/type_system/empty.md index 2fae1e7..5903c19 100644 --- a/docs/type_system/empty.md +++ b/docs/type_system/empty.md @@ -8,7 +8,7 @@ Container type can be null %empty ``` -## Use with `Option` Union +## Use with `Result` Union ```text make_array : ([yes] diff --git a/docs/type_system/function.md b/docs/type_system/function.md index af17b74..78abdf7 100644 --- a/docs/type_system/function.md +++ b/docs/type_system/function.md @@ -95,7 +95,7 @@ Invoked regular expression matcher ## \`yield -Yielding wraps the value in the transient union `Next` +Yielding wraps the value in the transient union `Iteration` Return `Void` to stop iteration diff --git a/docs/type_system/union.md b/docs/type_system/union.md index 2572591..f4b0b04 100644 --- a/docs/type_system/union.md +++ b/docs/type_system/union.md @@ -3,7 +3,7 @@ --- ```text -Union[CONTAINER | TRANSIENT | TRANSIENT_GENERIC] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] +Union[TAG | TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` ## Type Body Object Definitions @@ -17,7 +17,9 @@ typedef struct { # Alias ```text -Tag[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[CONTAINER] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] +Tag[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[TAG] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] + +Transient[Collection[VAR_TREE_LIST; TYPE.SYMBOL]] `alias Union[[TRANSIENT] Collection[VAR_TREE_LIST; TYPE.SYMBOL]] ``` ## Tag Example @@ -37,22 +39,16 @@ u : Tag[I64.a; I64.b; I64.c] $ (.c : 5) # Transient Unions +Return multiple types from a function + Can only be retuned from functions and operations. The inner value must be moved out ## Alias ```text -Transient_generic[Generic.T] `alias Union[[TRANSIENT_GENERIC] Generic.T.value] - -Result[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Error.error] - -Option[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Void.null] - -Next[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Void.done] - -Next_result[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Error.error; Void.done] +Result[Generic.T] `alias Transient[Generic.T.value; Void.null; Error.error] -Next_option[Generic.T] `alias Union[[TRANSIENT] Generic.T.value; Void.null; Void.done] +Iteration[Generic.T] `alias Transient[Generic.T.value; Void.null; Void.done; Error.error] ``` ## Default Operation |
