From dda8ef8f15662e7621251148eb1b1da7a22f199b Mon Sep 17 00:00:00 2001 From: nodist Date: Fri, 8 May 2026 10:03:05 -0400 Subject: examples with unqiue and operators --- docs/type_system/result.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/type_system/result.md (limited to 'docs/type_system/result.md') 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 -- cgit v1.2.3