summaryrefslogtreecommitdiff
path: root/An empty tuple is called a unit.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-08-03 22:29:47 +0200
committerJasper Ras <jras@hostnet.nl>2025-08-03 22:29:47 +0200
commit931eb0894e7cd3717f1218f0eb06382b11734c13 (patch)
treeb6ad9b0d98a8f26e496c91ad3f24d1c855b654df /An empty tuple is called a unit.md
parentaf98004d2cf437603f47f4224110a80d76d0d7de (diff)
vault backup: 2025-08-03 22:29:47
Diffstat (limited to 'An empty tuple is called a unit.md')
-rw-r--r--An empty tuple is called a unit.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/An empty tuple is called a unit.md b/An empty tuple is called a unit.md
new file mode 100644
index 0000000..a97056a
--- /dev/null
+++ b/An empty tuple is called a unit.md
@@ -0,0 +1,3 @@
+[[Rust]]
+
+An empty tuple `()` is named a `unit`. This acts as a sort of null value, it is the default value of functions that return nothing. So instead of saying it returns null I should say it returns a unit. \ No newline at end of file