summaryrefslogtreecommitdiff
path: root/spec/04-basic-declarations-and-definitions.md
diff options
context:
space:
mode:
authorDaniel Barclay <dbarclay@savi.com>2016-08-21 12:38:04 -0400
committerDaniel Barclay <dbarclay@savi.com>2016-08-21 12:38:04 -0400
commit34bbd14189b70d2757bb8e973f6a768f9b3b3459 (patch)
treeb4e5ad0813f440e7577fe239c90f04d967946b65 /spec/04-basic-declarations-and-definitions.md
parentebc7f8ffb0927e79da8e6ecbbd8dca2e0d2e56a0 (diff)
downloadscala-34bbd14189b70d2757bb8e973f6a768f9b3b3459.tar.gz
scala-34bbd14189b70d2757bb8e973f6a768f9b3b3459.tar.bz2
scala-34bbd14189b70d2757bb8e973f6a768f9b3b3459.zip
Editorial: Italicized more defining occurrences of terms.
Diffstat (limited to 'spec/04-basic-declarations-and-definitions.md')
-rw-r--r--spec/04-basic-declarations-and-definitions.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/04-basic-declarations-and-definitions.md b/spec/04-basic-declarations-and-definitions.md
index 7790428ca8..f6068eb9d8 100644
--- a/spec/04-basic-declarations-and-definitions.md
+++ b/spec/04-basic-declarations-and-definitions.md
@@ -595,9 +595,9 @@ ParamType ::= Type
| Type ‘*’
```
-A function declaration has the form `def $f\,\mathit{psig}$: $T$`, where
+A _function declaration_ has the form `def $f\,\mathit{psig}$: $T$`, where
$f$ is the function's name, $\mathit{psig}$ is its parameter
-signature and $T$ is its result type. A function definition
+signature and $T$ is its result type. A _function definition_
`def $f\,\mathit{psig}$: $T$ = $e$` also includes a _function body_ $e$,
i.e. an expression which defines the function's result. A parameter
signature consists of an optional type parameter clause `[$\mathit{tps}\,$]`,
@@ -612,13 +612,13 @@ result type, if one is given. If the function definition is not
recursive, the result type may be omitted, in which case it is
determined from the packed type of the function body.
-A type parameter clause $\mathit{tps}$ consists of one or more
+A _type parameter clause_ $\mathit{tps}$ consists of one or more
[type declarations](#type-declarations-and-type-aliases), which introduce type
parameters, possibly with bounds. The scope of a type parameter includes
the whole signature, including any of the type parameter bounds as
well as the function body, if it is present.
-A value parameter clause $\mathit{ps}$ consists of zero or more formal
+A _value parameter clause_ $\mathit{ps}$ consists of zero or more formal
parameter bindings such as `$x$: $T$` or `$x: T = e$`, which bind value
parameters and associate them with their types.
@@ -774,12 +774,12 @@ FunDef ::= FunSig [nl] ‘{’ Block ‘}’
Special syntax exists for procedures, i.e. functions that return the
`Unit` value `()`.
-A procedure declaration is a function declaration where the result type
+A _procedure declaration_ is a function declaration where the result type
is omitted. The result type is then implicitly completed to the
`Unit` type. E.g., `def $f$($\mathit{ps}$)` is equivalent to
`def $f$($\mathit{ps}$): Unit`.
-A procedure definition is a function definition where the result type
+A _procedure definition_ is a function definition where the result type
and the equals sign are omitted; its defining expression must be a block.
E.g., `def $f$($\mathit{ps}$) {$\mathit{stats}$}` is equivalent to
`def $f$($\mathit{ps}$): Unit = {$\mathit{stats}$}`.