diff options
Diffstat (limited to 'docs/type_system/result.md')
| -rw-r--r-- | docs/type_system/result.md | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/docs/type_system/result.md b/docs/type_system/result.md index 4a496fe..1b62fcb 100644 --- a/docs/type_system/result.md +++ b/docs/type_system/result.md @@ -2,38 +2,26 @@ --- -A 128bit value error pair, cannot be stored. - -A result represents an operation should not fail +The "result" of an operation, can have data, have no data, or be an error ```text Result[TYPE] ``` -# Default - -```text -x : // something that returns a result -// x is the value from the result -``` - -If the result is an error, an error is thrown - # Matching ```text -# ... { - .ok { arg; ... }[arg] - .error { arg; ... }[arg] +# RESULT { + .some { arg ... }[arg] + .none { ... } + .error { e ... }[e] } ``` -## .ok - -## .error +# Returning -# Return +## \`some -## \`ok +## \`none ## \`error |
