File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ sealed trait Tuple extends Product {
22
22
runtime.Tuples .toIArray(this )
23
23
24
24
/** Return a copy of `this` tuple with an element appended */
25
- inline def :* [This >: this .type <: Tuple , L ] (x : L ): Append [ This , L ] =
26
- runtime.Tuples .append(x, this ).asInstanceOf [Append [ This , L ] ]
25
+ inline def :* [This >: this .type <: Tuple , L ] (x : L ): This :* L =
26
+ runtime.Tuples .append(x, this ).asInstanceOf [This :* L ]
27
27
28
28
/** Return a new tuple by prepending the element to `this` tuple.
29
29
* This operation is O(this.size)
@@ -118,6 +118,9 @@ object Tuple {
118
118
case x *: xs => x *: Append [xs, Y ]
119
119
}
120
120
121
+ /** An infix shorthand for `Append[X, Y]` */
122
+ infix type :* [X <: Tuple , Y ] = Append [X , Y ]
123
+
121
124
/** Type of the head of a tuple */
122
125
type Head [X <: Tuple ] = X match {
123
126
case x *: _ => x
You can’t perform that action at this time.
0 commit comments