File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,18 +55,18 @@ object Option {
5555 * `foreach`:
5656 *
5757 * {{{
58- * val name: Option[String] = request getParameter "name"
59- * val upper = name map { _.trim } filter { _.length != 0 } map { _.toUpperCase }
60- * println(upper getOrElse "" )
58+ * val name: Option[String] = request. getParameter( "name")
59+ * val upper = name. map( _.trim). filter( _.length != 0). map( _.toUpperCase)
60+ * println(upper. getOrElse("") )
6161 * }}}
6262 *
6363 * Note that this is equivalent to {{{
6464 * val upper = for {
65- * name <- request getParameter "name"
65+ * name <- request. getParameter( "name")
6666 * trimmed <- Some(name.trim)
6767 * upper <- Some(trimmed.toUpperCase) if trimmed.length != 0
6868 * } yield upper
69- * println(upper getOrElse "" )
69+ * println(upper. getOrElse("") )
7070 * }}}
7171 *
7272 * Because of how for comprehension works, if $none is returned
@@ -254,7 +254,7 @@ sealed abstract class Option[+A] extends IterableOnce[A] with Product with Seria
254254 * }}}
255255 * This is also equivalent to:
256256 * {{{
257- * option map f getOrElse ifEmpty
257+ * option. map(f). getOrElse( ifEmpty)
258258 * }}}
259259 * @param ifEmpty the expression to evaluate if empty.
260260 * @param f the function to apply if nonempty.
You can’t perform that action at this time.
0 commit comments