diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-05-20 15:16:19 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-05-20 15:16:19 -0400 |
| commit | 83729ca507a3266f3793c3ff2db7229a86e80aa6 (patch) | |
| tree | 03c9d6d7c9443bbe67c1f3ab53618d719cff3228 /docs/type_system | |
| parent | dcf57ffd19ee65c46e9ee635ca6f8238b8f1f07f (diff) | |
mutiple next unions
Diffstat (limited to 'docs/type_system')
| -rw-r--r-- | docs/type_system/fn.md | 3 | ||||
| -rw-r--r-- | docs/type_system/index.md | 4 | ||||
| -rw-r--r-- | docs/type_system/shared.md | 4 | ||||
| -rw-r--r-- | docs/type_system/union.md | 8 |
4 files changed, 14 insertions, 5 deletions
diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index dce371d..458719a 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -21,7 +21,7 @@ Yielding wraps the value in the transient union `Next` Return `Void` to stop iteration ```text -fn : Fn[x] $ ( @ 1 .. x { `yield 2 * x } ) +fn : Fn[n] $ ( @ 1 .. n { `yield 2 * x }[x] ) it : fn `sync 10 // invoking @ it { `log v }[v] // 2 4 6 8 10 12 14 16 18 20 @@ -30,7 +30,6 @@ it : fn `sync 10 # `sync it { .value { `log v }[v] .done { `break } - .error { `return e }[e] } } ``` diff --git a/docs/type_system/index.md b/docs/type_system/index.md index 95602c6..88dc5e3 100644 --- a/docs/type_system/index.md +++ b/docs/type_system/index.md @@ -20,6 +20,10 @@ If a field in a template is not filed, one of these are required: Denotes a field in a template that has not resolved +##### Is[TYPE; ...] + +Denotes the type is one of the specified types in the list + ##### Void Denotes that a field that does not resolve to anything diff --git a/docs/type_system/shared.md b/docs/type_system/shared.md index 9fc9c1d..3982b5e 100644 --- a/docs/type_system/shared.md +++ b/docs/type_system/shared.md @@ -3,5 +3,7 @@ --- ```text -Shared[TYPE] +Shared_collector `alias Enum[.counting; .tracing] + +Shared[Shared_collector; TYPE] ``` diff --git a/docs/type_system/union.md b/docs/type_system/union.md index 7d0c798..81a3ecb 100644 --- a/docs/type_system/union.md +++ b/docs/type_system/union.md @@ -28,14 +28,18 @@ Result[ANY] `alias Union[.transient; ANY.value; Error.error] Option[ANY] `alias Union[.transient; ANY.some; Void.none] -Next[Any] `alias Union[.transient; ANY.value; Void.done; Error.error] +Next[Any] `alias Union[.transient; ANY.iter; Void.done] + +Next_result[Any] `alias Union[.transient; ANY.value; Error.error; Void.done] + +Next_option[Any] `alias Union[.transient; ANY.some; Void.none; Void.done] ``` ## Default Operation When a transient union is assigned the first type specified is moved out. -If the type is not the first specified a result with an error is returned to the parent function +If no match is used and if the type is not the first specified a result with an error is returned ```text z : x / y // Result[Int[...]] |
