Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Arguments can also be specified explicitly by the parameter name.
For example `inc_3(x: 7)`.
This is called a "named argument" and it verifies that the name of the parameter is correct,
to prevent mistakes.
For example, a call to `inc_3(y: 7)` would not compile
For example, a call to `inc_3(y: 7)` would not compile.
- If you use a variable as an argument and its name is the same as the parameter name, a
shorthand for writing `inc_3(x: x)` is to simply write `inc_3(:x)`.
This lets you write the name only once, but still verifies it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
= Unit type

A _unit type_ is a type which has only one value (xref:literal-expressions.adoc[unit literal], `
()`).
A _unit type_ is a type which has only one value (xref:literal-expressions.adoc[unit literal], `()`).
It is represented by a tuple with no elements.
Its size is always zero, and it is guaranteed to not exist in the compiled code.