summaryrefslogtreecommitdiff
path: root/docs/type_system/option.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/type_system/option.md')
-rw-r--r--docs/type_system/option.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/type_system/option.md b/docs/type_system/option.md
new file mode 100644
index 0000000..2532485
--- /dev/null
+++ b/docs/type_system/option.md
@@ -0,0 +1,37 @@
+# Option
+
+---
+
+A 128bit value status pair, cannot be stored.
+
+```text
+Option[TYPE]
+```
+
+# Default
+
+```text
+x : // something that returns an option
+// x is the value from the option
+```
+
+If option is none an error is thrown
+
+# Matching
+
+```text
+# ... {
+ .some { arg; ... }[arg]
+ .nome { ... }
+}
+```
+
+## .some
+
+## .none
+
+# Return
+
+## \`some
+
+## \`none