From 7258293701f27e521401a1739e28d7a92b233c3b Mon Sep 17 00:00:00 2001 From: fedgehog Date: Wed, 7 Dec 2011 22:20:19 +0200 Subject: Fix documentation error --- src/library/scala/Either.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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] = -- cgit v1.2.3