@@ -9,109 +9,109 @@ import scala.annotation.implicitNotFound
9
9
*/
10
10
@ implicitNotFound(" ${F} cannot be tupled as ${G}" )
11
11
sealed trait TupledFunction [F , G ] {
12
- def apply (f : F ): G
12
+ def tuple (f : F ): G
13
13
}
14
14
15
15
package internal {
16
16
17
17
object TupledFunction {
18
18
19
19
def tupledFunction0 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
20
- def apply (f : F ): G =
20
+ def tuple (f : F ): G =
21
21
((args : Unit ) => f.asInstanceOf [() => Any ].apply()).asInstanceOf [G ]
22
22
}
23
23
24
24
def tupledFunction1 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
25
- def apply (f : F ): G =
25
+ def tuple (f : F ): G =
26
26
((args : Tuple1 [Any ]) => f.asInstanceOf [Any => Any ].apply(args._1)).asInstanceOf [G ]
27
27
}
28
28
29
29
def tupledFunction2 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
30
- def apply (f : F ): G = f.asInstanceOf [Function2 [_, _, _]].tupled.asInstanceOf [G ]
30
+ def tuple (f : F ): G = f.asInstanceOf [Function2 [_, _, _]].tupled.asInstanceOf [G ]
31
31
}
32
32
33
33
def tupledFunction3 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
34
- def apply (f : F ): G = f.asInstanceOf [Function3 [_, _, _, _]].tupled.asInstanceOf [G ]
34
+ def tuple (f : F ): G = f.asInstanceOf [Function3 [_, _, _, _]].tupled.asInstanceOf [G ]
35
35
}
36
36
37
37
def tupledFunction4 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
38
- def apply (f : F ): G = f.asInstanceOf [Function4 [_, _, _, _, _]].tupled.asInstanceOf [G ]
38
+ def tuple (f : F ): G = f.asInstanceOf [Function4 [_, _, _, _, _]].tupled.asInstanceOf [G ]
39
39
}
40
40
41
41
def tupledFunction5 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
42
- def apply (f : F ): G = f.asInstanceOf [Function5 [_, _, _, _, _, _]].tupled.asInstanceOf [G ]
42
+ def tuple (f : F ): G = f.asInstanceOf [Function5 [_, _, _, _, _, _]].tupled.asInstanceOf [G ]
43
43
}
44
44
45
45
def tupledFunction6 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
46
- def apply (f : F ): G = f.asInstanceOf [Function6 [_, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
46
+ def tuple (f : F ): G = f.asInstanceOf [Function6 [_, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
47
47
}
48
48
49
49
def tupledFunction7 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
50
- def apply (f : F ): G = f.asInstanceOf [Function7 [_, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
50
+ def tuple (f : F ): G = f.asInstanceOf [Function7 [_, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
51
51
}
52
52
53
53
def tupledFunction8 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
54
- def apply (f : F ): G = f.asInstanceOf [Function8 [_, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
54
+ def tuple (f : F ): G = f.asInstanceOf [Function8 [_, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
55
55
}
56
56
57
57
def tupledFunction9 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
58
- def apply (f : F ): G = f.asInstanceOf [Function9 [_, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
58
+ def tuple (f : F ): G = f.asInstanceOf [Function9 [_, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
59
59
}
60
60
61
61
def tupledFunction10 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
62
- def apply (f : F ): G = f.asInstanceOf [Function10 [_, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
62
+ def tuple (f : F ): G = f.asInstanceOf [Function10 [_, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
63
63
}
64
64
65
65
def tupledFunction11 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
66
- def apply (f : F ): G = f.asInstanceOf [Function11 [_, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
66
+ def tuple (f : F ): G = f.asInstanceOf [Function11 [_, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
67
67
}
68
68
69
69
def tupledFunction12 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
70
- def apply (f : F ): G = f.asInstanceOf [Function12 [_, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
70
+ def tuple (f : F ): G = f.asInstanceOf [Function12 [_, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
71
71
}
72
72
73
73
def tupledFunction13 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
74
- def apply (f : F ): G = f.asInstanceOf [Function13 [_, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
74
+ def tuple (f : F ): G = f.asInstanceOf [Function13 [_, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
75
75
}
76
76
77
77
def tupledFunction14 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
78
- def apply (f : F ): G = f.asInstanceOf [Function14 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
78
+ def tuple (f : F ): G = f.asInstanceOf [Function14 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
79
79
}
80
80
81
81
def tupledFunction15 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
82
- def apply (f : F ): G = f.asInstanceOf [Function15 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
82
+ def tuple (f : F ): G = f.asInstanceOf [Function15 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
83
83
}
84
84
85
85
def tupledFunction16 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
86
- def apply (f : F ): G = f.asInstanceOf [Function16 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
86
+ def tuple (f : F ): G = f.asInstanceOf [Function16 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
87
87
}
88
88
89
89
def tupledFunction17 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
90
- def apply (f : F ): G = f.asInstanceOf [Function17 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
90
+ def tuple (f : F ): G = f.asInstanceOf [Function17 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
91
91
}
92
92
93
93
def tupledFunction18 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
94
- def apply (f : F ): G = f.asInstanceOf [Function18 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
94
+ def tuple (f : F ): G = f.asInstanceOf [Function18 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
95
95
}
96
96
97
97
def tupledFunction19 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
98
- def apply (f : F ): G = f.asInstanceOf [Function19 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
98
+ def tuple (f : F ): G = f.asInstanceOf [Function19 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
99
99
}
100
100
101
101
def tupledFunction20 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
102
- def apply (f : F ): G = f.asInstanceOf [Function20 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
102
+ def tuple (f : F ): G = f.asInstanceOf [Function20 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
103
103
}
104
104
105
105
def tupledFunction21 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
106
- def apply (f : F ): G = f.asInstanceOf [Function21 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
106
+ def tuple (f : F ): G = f.asInstanceOf [Function21 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
107
107
}
108
108
109
109
def tupledFunction22 [F , G ]: TupledFunction [F , G ] = new TupledFunction {
110
- def apply (f : F ): G = f.asInstanceOf [Function22 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
110
+ def tuple (f : F ): G = f.asInstanceOf [Function22 [_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]].tupled.asInstanceOf [G ]
111
111
}
112
112
113
113
def tupledFunctionXXL [F , G ]: TupledFunction [F , G ] = new TupledFunction {
114
- def apply (f : F ): G =
114
+ def tuple (f : F ): G =
115
115
((args : TupleXXL ) => f.asInstanceOf [FunctionXXL ].apply(args.elems)).asInstanceOf [G ]
116
116
}
117
117
0 commit comments