File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -84,15 +84,11 @@ object Tuple {
84
84
}
85
85
86
86
/** Type of the initial part of the tuple without its last element */
87
- type Init [X <: NonEmptyTuple ] <: Tuple = X match {
87
+ @ experimental
88
+ type Init [X <: Tuple ] <: Tuple = X match {
88
89
case _ *: EmptyTuple => EmptyTuple
89
90
case x *: xs =>
90
- xs match {
91
- case _ *: EmptyTuple =>
92
- x *: EmptyTuple
93
- case _ =>
94
- x *: Init [xs]
95
- }
91
+ x *: Init [xs]
96
92
}
97
93
98
94
/** Type of the tail of a tuple */
@@ -101,13 +97,15 @@ object Tuple {
101
97
}
102
98
103
99
/** Type of the last of a tuple */
104
- type Last [X <: NonEmptyTuple ] = Reduce [X , EmptyTuple ] match {
100
+ @ experimental
101
+ type Last [X <: Tuple ] = Reduce [X , EmptyTuple ] match {
105
102
case x *: xs => xs match {
106
103
case EmptyTuple => x
107
104
}
108
105
}
109
106
110
107
/** Type of the reduce of the first tuple to a tuple of arity 1 or provide the second tuple as a result */
108
+ @ experimental
111
109
type Reduce [X <: Tuple , Y <: Tuple ] <: Tuple = X match {
112
110
case EmptyTuple => Y
113
111
case x *: xs => xs match {
You can’t perform that action at this time.
0 commit comments