From 7cca7635b392cb533d0f8e26b74d7362c0dd3891 Mon Sep 17 00:00:00 2001 From: jxcoder Date: Thu, 3 Jul 2014 11:02:49 +0700 Subject: Refactored example to Option.collect method. --- src/library/scala/Option.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala index d263f89bb8..66900e7258 100644 --- a/src/library/scala/Option.scala +++ b/src/library/scala/Option.scala @@ -264,13 +264,13 @@ sealed abstract class Option[+A] extends Product with Serializable { * * @example {{{ * // Returns Some(HTTP) because the partial function covers the case. - * Some("http").collect({case "http" => "HTTP"}) + * Some("http") collect {case "http" => "HTTP"} * * // Returns None because the partial function doesn't cover the case. - * Some("ftp").collect({case "http" => "HTTP"}) + * Some("ftp") collect {case "http" => "HTTP"} * * // Returns None because None is passed to the collect method. - * None.collect({case value => value}) + * None collect {case value => value} * }}} * * @param pf the partial function. -- cgit v1.2.3