Skip to content

Commit

Permalink
Split some overly long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
steffahn committed Jan 28, 2024
1 parent d2aa5b6 commit 0077f58
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/items/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ A _function_ consists of a [block] (that's the _body_ of the function),
along with a name, a set of parameters, and an output type.
Other than a name, all these are optional.
Functions are declared with the keyword `fn`.
Functions may declare a set of *input* [*variables*][variables] as parameters, through which the caller passes arguments into the function, and the *output* [*type*][type] of the value the function will return to its caller on completion.
Functions may declare a set of *input* [*variables*][variables] as parameters,
through which the caller passes arguments into the function, and the *output*
[*type*][type] of the value the function will return to its caller on completion.
If the output type is not explicitly stated, it is the [unit type].

When referred to, a _function_ yields a first-class *value* of the corresponding zero-sized [*function item type*], which when called evaluates to a direct call to the function.
When referred to, a _function_ yields a first-class *value* of the corresponding
zero-sized [*function item type*], which when called evaluates to a direct call to the function.

For example, this is a simple function:
```rust
Expand Down

0 comments on commit 0077f58

Please sign in to comment.