diff options
Diffstat (limited to '14-the-scala-standard-library.md')
-rw-r--r-- | 14-the-scala-standard-library.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/14-the-scala-standard-library.md b/14-the-scala-standard-library.md index da3d1f75ab..d03dc53efc 100644 --- a/14-the-scala-standard-library.md +++ b/14-the-scala-standard-library.md @@ -365,7 +365,7 @@ These are defined as follows. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.scala} package scala -case class Tuple$n$[+a_1, ..., +a_n](_1: a_1, ..., _$n$: a_$n$) { +case class Tuple$n$[+A_1, ..., +A_n](_1: A_1, ..., _$n$: A_$n$) { def toString = "(" ++ _1 ++ "," ++ $\ldots$ ++ "," ++ _$n$ ++ ")" } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -381,8 +381,8 @@ These are defined as follows. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.scala} package scala -trait Function$n$[-a_1, ..., -a_$n$, +b] { - def apply(x_1: a_1, ..., x_$n$: a_$n$): b +trait Function$n$[-A_1, ..., -A_$n$, +B] { + def apply(x_1: A_1, ..., x_$n$: A_$n$): B def toString = "<function>" } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |