summaryrefslogtreecommitdiff
path: root/src/library/scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala')
-rw-r--r--src/library/scala/collection/GenTraversableOnce.scala2
-rw-r--r--src/library/scala/inline.scala2
-rw-r--r--src/library/scala/noinline.scala2
-rw-r--r--src/library/scala/util/Either.scala38
4 files changed, 22 insertions, 22 deletions
diff --git a/src/library/scala/collection/GenTraversableOnce.scala b/src/library/scala/collection/GenTraversableOnce.scala
index d3096a872c..f87f7654bc 100644
--- a/src/library/scala/collection/GenTraversableOnce.scala
+++ b/src/library/scala/collection/GenTraversableOnce.scala
@@ -96,7 +96,7 @@ trait GenTraversableOnce[+A] extends Any {
*/
def size: Int
- /** The size of this $coll if it is can be cheaply computed
+ /** The size of this $coll, if it can be cheaply computed
*
* @return the number of elements in this $coll, or -1 if the size cannot be determined cheaply
*/
diff --git a/src/library/scala/inline.scala b/src/library/scala/inline.scala
index dc55af301c..f6d7c7569e 100644
--- a/src/library/scala/inline.scala
+++ b/src/library/scala/inline.scala
@@ -29,7 +29,7 @@ package scala
* }
* }}}
*
- * Note: parentheses are required when annotating a callsite withing a larger expression.
+ * Note: parentheses are required when annotating a callsite within a larger expression.
*
* {{{
* def t1 = f1(1) + f1(1): @noinline // equivalent to (f1(1) + f1(1)): @noinline
diff --git a/src/library/scala/noinline.scala b/src/library/scala/noinline.scala
index a427e170f4..0cd5ef9f64 100644
--- a/src/library/scala/noinline.scala
+++ b/src/library/scala/noinline.scala
@@ -29,7 +29,7 @@ package scala
* }
* }}}
*
- * Note: parentheses are required when annotating a callsite withing a larger expression.
+ * Note: parentheses are required when annotating a callsite within a larger expression.
*
* {{{
* def t1 = f1(1) + f1(1): @noinline // equivalent to (f1(1) + f1(1)): @noinline
diff --git a/src/library/scala/util/Either.scala b/src/library/scala/util/Either.scala
index c332f18295..7bded972f2 100644
--- a/src/library/scala/util/Either.scala
+++ b/src/library/scala/util/Either.scala
@@ -55,31 +55,31 @@ package util
* val left23: Left[Double, Int] = Left(23.0)
* val left42 = Left(42.0)
*
- * for (
- * a <- right1;
- * b <- right2;
+ * for {
+ * a <- right1
+ * b <- right2
* c <- right3
- * ) yield a + b + c // Right(6)
+ * } yield a + b + c // Right(6)
*
- * for (
- * a <- right1;
- * b <- right2;
+ * for {
+ * a <- right1
+ * b <- right2
* c <- left23
- * ) yield a + b + c // Left(23.0)
+ * } yield a + b + c // Left(23.0)
*
- * for (
- * a <- right1;
- * b <- left23;
+ * for {
+ * a <- right1
+ * b <- left23
* c <- right2
- * ) yield a + b + c // Left(23.0)
+ * } yield a + b + c // Left(23.0)
*
* // It is advisable to provide the type of the “missing” value (especially the right value for `Left`)
* // as otherwise that type might be infered as `Nothing` without context:
- * for (
- * a <- left23;
- * b <- right1;
+ * for {
+ * a <- left23
+ * b <- right1
* c <- left42 // type at this position: Either[Double, Nothing]
- * ) yield a + b + c
+ * } yield a + b + c
* // ^
* // error: ambiguous reference to overloaded definition,
* // both method + in class Int of type (x: Char)Int
@@ -136,10 +136,10 @@ sealed abstract class Either[+A, +B] extends Product with Serializable {
* @example {{{
* val right = Right(2)
* val left = Left(3)
- * for (
- * r1 <- right;
+ * for {
+ * r1 <- right
* r2 <- left.swap
- * ) yield r1 * r2 // Right(6)
+ * } yield r1 * r2 // Right(6)
* }}}
*/
def swap: Either[B, A] = this match {