diff options
Diffstat (limited to '09-implicit-parameters-and-views.md')
-rw-r--r-- | 09-implicit-parameters-and-views.md | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/09-implicit-parameters-and-views.md b/09-implicit-parameters-and-views.md index 202bf8dbd1..cdbafd9ca4 100644 --- a/09-implicit-parameters-and-views.md +++ b/09-implicit-parameters-and-views.md @@ -1,8 +1,6 @@ -Implicit Parameters and Views -============================= +# Implicit Parameters and Views -The Implicit Modifier ---------------------- +## The Implicit Modifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar} LocalModifier ::= ‘implicit’ @@ -37,8 +35,7 @@ type members, as well as for [top-level objects](#packagings). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Implicit Parameters -------------------- +## Implicit Parameters An implicit parameter list `(implicit $p_1$,$\ldots$,$p_n$)`{.scala} of a method marks the parameters $p_1 , \ldots , p_n$ as @@ -248,8 +245,7 @@ the type: will issue an error signalling a divergent implicit expansion. -Views ------ +## Views Implicit parameters and methods can also define implicit conversions called views. A _view_ from type $S$ to type $T$ is @@ -319,8 +315,7 @@ or the call-by-name category). method. -Context Bounds and View Bounds ------------------------------- +## Context Bounds and View Bounds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar} TypeParam ::= (id | ‘_’) [TypeParamClause] [‘>:’ Type] [‘<:’ Type] @@ -372,8 +367,7 @@ additional implicit parameters. def <= [B >: A <% Ordered[B]](that: B): Boolean ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Manifests ---------- +## Manifests Manifests are type descriptors that can be automatically generated by |