Skip to content

Commit 47814a4

Browse files
committed
Rollup merge of rust-lang#22377 - thiagooak:book-glossary, r=steveklabnik
@steveklabnik Trying out the Glossary idea. Added the paragraph about 'complicated words' because I think it would be useful to those contributing to the book. Maybe this should not be here
2 parents 96a4756 + 9783cc2 commit 47814a4

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/doc/trpl/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@
3737
* [Macros](macros.md)
3838
* [Compiler Plugins](plugins.md)
3939
* [Conclusion](conclusion.md)
40+
* [Glossary](glossary.md)

src/doc/trpl/glossary.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
% Glossary
2+
3+
Not every Rustacean has a background in systems programming, nor in computer
4+
science, so we've added explanations of terms that might be unfamiliar.
5+
6+
### Arity
7+
8+
Arity refers to the number of arguments a function or operation takes.
9+
10+
```rust
11+
let x = (2, 3);
12+
let y = (4, 6);
13+
let z = (8, 2, 6);
14+
```
15+
16+
In the example above `x` and `y` have arity 2. `z` has arity 3.

0 commit comments

Comments
 (0)