File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ package scala
15
15
package object next {
16
16
implicit final class OptionOpsExtensions [A ](val v : Option [A ]) extends AnyVal {
17
17
/** Apply the side-effecting function `f` to the option's value
18
- * if it is nonempty. Otherwise, do nothing.
19
- *
20
- * @param f a function to apply to the option's value
21
- * @return the option
22
- */
18
+ * if it is nonempty. Otherwise, do nothing.
19
+ *
20
+ * @param f a function to apply to the option's value
21
+ * @return the option
22
+ */
23
23
def tapEach [B ](f : A => B ): Option [A ] = { v.foreach(f); v }
24
24
}
25
25
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ package scala.next
15
15
final class TestOptionOpsExtensions {
16
16
// Compile checks the return type, no need to run as test.
17
17
def tapEachReturnType (): Option [Int ] = {
18
- // Don't return the Option directly, so the compiler is not able to coerce a specific implicit to be used.
18
+ // Don't return the option directly, so the compiler is not able to coerce a specific implicit to be used.
19
19
val opt = Option (5 ).tapEach(identity)
20
20
opt.map(identity)
21
21
}
You can’t perform that action at this time.
0 commit comments