You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/changed-features/wildcards.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ We pick `?` as a replacement syntax for wildcard types, since it aligns with Jav
21
21
22
22
### Migration Strategy
23
23
24
-
The migration to the new scheme is complicated, in particular since the [kind projector](https://github.com/typelevel/kind-projector])
24
+
The migration to the new scheme is complicated, in particular since the [kind projector](https://github.com/typelevel/kind-projector)
25
25
compiler plugin still uses the reverse convention, with `?` meaning parameter placeholder instead of wildcard. Fortunately, kind projector has added `*` as an alternative syntax for `?`.
26
26
27
27
A step-by-step migration is made possible with the following measures:
Copy file name to clipboardExpand all lines: docs/docs/reference/other-new-features/tupled-function.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ title: "Tupled Function"
6
6
Tupled Function
7
7
----------------------
8
8
9
-
With functions bounded to arities up to 22 it was possible to generalize some operation on all function types using overloading.
10
-
Now that we have functions and tuples generalized to [arities above 22](../dropped-features/limit22.md) overloading is not an option anymore.
9
+
With functions bounded to arities up to 22 it was possible to generalize some operation on all function types using overloading.
10
+
Now that we have functions and tuples generalized to [arities above 22](../dropped-features/limit22.md) overloading is not an option anymore.
11
11
The type class `TupleFunction` provides a way to abstract directly over a function of any arity converting it to an equivalent function that receives all arguments in a single tuple.
12
12
13
13
```scala
@@ -33,7 +33,7 @@ The compiler will synthesize an instance of `TupledFunction[F, G]` if:
33
33
34
34
Examples
35
35
--------
36
-
`TupledFunction` can be used to generalize the `Function1.tupled`, ... `Function22.tupled` methods to functions of any arities ([full example](https://github.com/lampepfl/dotty/tests/run/tupled-function-tupled.scala))
36
+
`TupledFunction` can be used to generalize the `Function1.tupled`, ... `Function22.tupled` methods to functions of any arities ([full example](https://github.com/lampepfl/dotty/blob/master/tests/run/tupled-function-tupled.scala))
37
37
38
38
```scala
39
39
/** Creates a tupled version of this function: instead of N arguments,
`TupledFunction` can be used to generalize the `Function.untupled` methods to functions of any arities ([full example](https://github.com/lampepfl/dotty/tests/run/tupled-function-untupled.scala))
49
+
`TupledFunction` can be used to generalize the `Function.untupled` methods to functions of any arities ([full example](https://github.com/lampepfl/dotty/blob/master/tests/run/tupled-function-untupled.scala))
50
50
51
51
```scala
52
52
/** Creates an untupled version of this function: instead of single [[scala.Tuple]] argument,
`TupledFunction` can also be used to generalize the [`Tuple1.compose`](https://github.com/lampepfl/dotty/tests/run/tupled-function-compose.scala) and [`Tuple1.andThen`](https://github.com/lampepfl/dotty/tests/run/tupled-function-andThen.scala) methods to compose functions of larger arities and with functions that return tuples.
64
+
`TupledFunction` can also be used to generalize the [`Tuple1.compose`](https://github.com/lampepfl/dotty/blob/master/tests/run/tupled-function-compose.scala) and [`Tuple1.andThen`](https://github.com/lampepfl/dotty/blob/master/tests/run/tupled-function-andThen.scala) methods to compose functions of larger arities and with functions that return tuples.
65
65
66
66
```scala
67
67
/** Composes two instances of TupledFunctions in a new TupledFunctions, with this function applied last
0 commit comments