]> git.lizzy.rs Git - rust.git/commitdiff
reference: 3 of the 4 things mentioned here are optional
authorTshepang Lekhonkhobe <tshepang@gmail.com>
Thu, 24 Sep 2015 06:18:00 +0000 (08:18 +0200)
committerTshepang Lekhonkhobe <tshepang@gmail.com>
Thu, 24 Sep 2015 06:22:58 +0000 (08:22 +0200)
src/doc/reference.md

index 83849574260e1ff93034292314a991f962be5935..7cae6a515cb07752548ef3739fbd60b57b3c9aaf 100644 (file)
@@ -900,9 +900,10 @@ fn main() {}
 
 ### Functions
 
-A _function item_ defines a sequence of [statements](#statements) and an
-optional final [expression](#expressions), along with a name and a set of
-parameters. Functions are declared with the keyword `fn`. Functions declare a
+A _function item_ defines a sequence of [statements](#statements) and a
+final [expression](#expressions), along with a name and a set of
+parameters. 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*](#types)
 of the value the function will return to its caller on completion.