diff options
author | fedgehog <familiar.hedgehog@gmail.com> | 2011-12-07 22:20:19 +0200 |
---|---|---|
committer | fedgehog <familiar.hedgehog@gmail.com> | 2011-12-07 22:20:19 +0200 |
commit | 7258293701f27e521401a1739e28d7a92b233c3b (patch) | |
tree | 95e3a6c807e60d7aafbef2babaf42121e3e83754 /src | |
parent | 332fec96e31840878bed41dd7b5314b97d8da7c2 (diff) | |
download | scala-7258293701f27e521401a1739e28d7a92b233c3b.tar.gz scala-7258293701f27e521401a1739e28d7a92b233c3b.tar.bz2 scala-7258293701f27e521401a1739e28d7a92b233c3b.zip |
Fix documentation error
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Either.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/Either.scala b/src/library/scala/Either.scala index bc75f0f088..e454cdf5ec 100644 --- a/src/library/scala/Either.scala +++ b/src/library/scala/Either.scala @@ -575,15 +575,15 @@ object Either { } } - /** If the condition is satisfied, return the given `A` in `Left`, - * otherwise, return the given `B` in `Right`. + /** If the condition is satisfied, return the given `B` in `Right`, + * otherwise, return the given `A` in `Left`. * * {{{ * val userInput: String = ... * Either.cond( * userInput.forall(_.isDigit) && userInput.size == 10, - * "The input (%s) does not look like a phone number".format(userInput), - * PhoneNumber(userInput) + * PhoneNumber(userInput), + * "The input (%s) does not look like a phone number".format(userInput) * }}} */ def cond[A, B](test: Boolean, right: => B, left: => A): Either[A, B] = |