diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-10-06 14:00:47 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-10-06 14:00:47 -0400 |
| commit | 140438f8ba419f70c2f2d06efd7f90491294957d (patch) | |
| tree | a937df87178234e5bfea2df9eb40476b76e63dca /docs | |
| parent | 33ff7b7fafd1953ddf1355a6dffa0653ce6e8a5c (diff) | |
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tagging.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/tagging.md b/docs/tagging.md index 0dd44e2..1a57305 100644 --- a/docs/tagging.md +++ b/docs/tagging.md @@ -8,31 +8,31 @@ ```text r : # x / y { - .value {[value] value } + .default {[value] value } .error {[error] `log error; 0 } } ``` ### Asserting -If no tag is specified for an operation, `.value` is used +If no tag is specified for an operation, `.default` is used An invalid assertion produces an `Error` with an `.error` tag ```text -r : x /.value y +r : x /.default y r : x / y // same as above ``` ## Lambdas -If no tag is specified `.value` is used, user defined coroutines don't have to have a `.value` tag +If no tag is specified `.default` is used, user defined coroutines don't have to have a `.default` tag ### Returning ```text -add : `{[I64 x; I64 y] `return.value x + y } -add : `{[I64 x; I64 y] .value x + y } // same as above +add : `{[I64 x; I64 y] `return.default x + y } +add : `{[I64 x; I64 y] .default x + y } // same as above add : `{[I64 x; I64 y] x + y } // same as above mu : `{[Bool i] ? i { @@ -68,7 +68,7 @@ Generators use a `.done` tag to denote when it is complete gen : ^{[I64 n] @ 1 .. n {[x] `yield x - // above is alias for -> `yield.value x + // above is alias for -> `yield.default x } // stopping is implicit, use `stop to explicitly end iterator } @@ -80,7 +80,7 @@ it : gen `init 10 ```text v : # `next it { - .value {[x] x } + .default {[x] x } .done { -1 } } ``` @@ -88,7 +88,7 @@ v : # `next it { ### Asserting ```text -v : `next.value it +v : `next.default it v : `next it // same as above ``` |
