File tree Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,4 @@ package object next {
19
19
col : IterableOnceOps [A , CC , C ]
20
20
): NextIterableOnceOpsExtensions [A , CC , C ] =
21
21
new NextIterableOnceOpsExtensions (col)
22
-
23
- implicit final class OptionOpsExtensions [A ](val v : Option [A ]) extends AnyVal {
24
- /** Apply the side-effecting function `f` to the option's value
25
- * if it is nonempty. Otherwise, do nothing.
26
- *
27
- * @param f a function to apply to the option's value
28
- * @return the option
29
- */
30
- def tapEach [B ](f : A => B ): Option [A ] = { v.foreach(f); v }
31
- }
32
22
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Scala (https://www.scala-lang.org)
3
+ *
4
+ * Copyright EPFL and Lightbend, Inc.
5
+ *
6
+ * Licensed under Apache License 2.0
7
+ * (http://www.apache.org/licenses/LICENSE-2.0).
8
+ *
9
+ * See the NOTICE file distributed with this work for
10
+ * additional information regarding copyright ownership.
11
+ */
12
+
13
+ package scala
14
+
15
+ package object next {
16
+ implicit final class OptionOpsExtensions [A ](val v : Option [A ]) extends AnyVal {
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
+ */
23
+ def tapEach [B ](f : A => B ): Option [A ] = { v.foreach(f); v }
24
+ }
25
+ }
Original file line number Diff line number Diff line change 10
10
* additional information regarding copyright ownership.
11
11
*/
12
12
13
- package scala .collection . next
13
+ package scala .next
14
14
15
15
final class TestOptionOpsExtensions {
16
16
// Compile checks the return type, no need to run as test.
You can’t perform that action at this time.
0 commit comments