File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ sealed trait Tuple extends Product {
3434 /** Return a new tuple by concatenating `this` tuple with `that` tuple.
3535 * This operation is O(this.size + that.size)
3636 */
37- inline def ++ [This >: this .type <: Tuple ](that : Tuple ): Concat [ This , that.type ] =
38- runtime.Tuples .concat(this , that).asInstanceOf [Concat [ This , that.type ] ]
37+ inline def ++ [This >: this .type <: Tuple ](that : Tuple ): This ++ that.type =
38+ runtime.Tuples .concat(this , that).asInstanceOf [This ++ that.type ]
3939
4040 /** Return the size (or arity) of the tuple */
4141 inline def size [This >: this .type <: Tuple ]: Size [This ] =
@@ -126,6 +126,9 @@ object Tuple {
126126 case x1 *: xs1 => x1 *: Concat [xs1, Y ]
127127 }
128128
129+ /** An infix shorthand for `Concat[X, Y]` */
130+ infix type ++ [X <: Tuple , + Y <: Tuple ] = Concat [X , Y ]
131+
129132 /** Type of the element at position N in the tuple X */
130133 type Elem [X <: Tuple , N <: Int ] = X match {
131134 case x *: xs =>
You can’t perform that action at this time.
0 commit comments