diff options
Diffstat (limited to 'doc/reference')
-rw-r--r-- | doc/reference/ExamplesPart.tex | 2 | ||||
-rw-r--r-- | doc/reference/ReferencePart.tex | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/reference/ExamplesPart.tex b/doc/reference/ExamplesPart.tex index 66dd72486b..4a2ad670df 100644 --- a/doc/reference/ExamplesPart.tex +++ b/doc/reference/ExamplesPart.tex @@ -4129,7 +4129,7 @@ three functions again, this time implemented using for-comprehensions. \begin{lstlisting} object Demo { def map[a, b](xs: List[a], f: a => b): List[b] = - for (val x <- cs) yield f(x); + for (val x <- xs) yield f(x); def flatMap[a, b](xs: List[a], f: a => List[b]): List[b] = for (val x <- xs; val y <- f(x)) yield y; diff --git a/doc/reference/ReferencePart.tex b/doc/reference/ReferencePart.tex index 0887f72917..fcc2c4820f 100644 --- a/doc/reference/ReferencePart.tex +++ b/doc/reference/ReferencePart.tex @@ -1429,7 +1429,7 @@ function. That is, the argument is evaluated using {\em call-by-name}. \begin{lstlisting} def whileLoop (cond: => Boolean) (stat: => Unit): Unit \end{lstlisting} -indicates that both parameters of \code{while} are evaluated using +indicates that both parameters of \code{whileLoop} are evaluated using call-by-name. The last value parameter of a parameter section may be suffixed by |