diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2013-02-21 03:54:08 +0100 |
---|---|---|
committer | Iain McGinniss <iainmcgin@gmail.com> | 2013-02-21 10:08:05 +0000 |
commit | 50ce3228b80475d1a0d748ec40ef532afb96df8f (patch) | |
tree | 94f28c3aee44315bca931ac12ebdadfa6ba922ef /14-the-scala-standard-library.md | |
parent | 2311e3498bea8d149cc38a6d3585de245134add9 (diff) | |
download | scala-50ce3228b80475d1a0d748ec40ef532afb96df8f.tar.gz scala-50ce3228b80475d1a0d748ec40ef532afb96df8f.tar.bz2 scala-50ce3228b80475d1a0d748ec40ef532afb96df8f.zip |
Miscellaneous cleanups:
- Value of Unit is (), not {}
- Fix desugared pattern matching code
- Mention object-protected values
- Use uppercase type variables for Tuple/Function code
- Replace Application with App
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>" } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |