From 50ce3228b80475d1a0d748ec40ef532afb96df8f Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Thu, 21 Feb 2013 03:54:08 +0100 Subject: 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 --- 14-the-scala-standard-library.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '14-the-scala-standard-library.md') 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 = "" } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3