diff options
Diffstat (limited to 'docs/type_system/result.md')
| -rw-r--r-- | docs/type_system/result.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/type_system/result.md b/docs/type_system/result.md new file mode 100644 index 0000000..e33f04b --- /dev/null +++ b/docs/type_system/result.md @@ -0,0 +1,37 @@ +# Result + +--- + +A 128bit value error pair, cannot be stored. + +```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] +} +``` + +## .ok + +## .error + +# Return + +## \`ok + +## \`error |
