File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,18 +55,18 @@ object Option {
55
55
* `foreach`:
56
56
*
57
57
* {{{
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("") )
61
61
* }}}
62
62
*
63
63
* Note that this is equivalent to {{{
64
64
* val upper = for {
65
- * name <- request getParameter "name"
65
+ * name <- request. getParameter( "name")
66
66
* trimmed <- Some(name.trim)
67
67
* upper <- Some(trimmed.toUpperCase) if trimmed.length != 0
68
68
* } yield upper
69
- * println(upper getOrElse "" )
69
+ * println(upper. getOrElse("") )
70
70
* }}}
71
71
*
72
72
* 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
254
254
* }}}
255
255
* This is also equivalent to:
256
256
* {{{
257
- * option map f getOrElse ifEmpty
257
+ * option. map(f). getOrElse( ifEmpty)
258
258
* }}}
259
259
* @param ifEmpty the expression to evaluate if empty.
260
260
* @param f the function to apply if nonempty.
You can’t perform that action at this time.
0 commit comments