@@ -80,7 +80,7 @@ internal extension Dictionary {
80
80
}
81
81
82
82
// Intersection
83
- return filtered. filter ( testFunction : { ( key: K , value: V ) -> Bool in
83
+ return filtered. filter ( { ( key: K , value: V ) -> Bool in
84
84
// check for [key: value] in all the dictionaries
85
85
dictionaries. all { 0ドル. has ( key) && 0ドル [ key] == value }
86
86
} )
@@ -104,7 +104,7 @@ internal extension Dictionary {
104
104
:param: mapFunction
105
105
:returns: Mapped array
106
106
*/
107
- func toArray < V> ( mapFunction map: ( Key , Value ) -> V ) -> [ V ] {
107
+ func toArray < V> ( map: ( Key , Value ) -> V ) -> [ V ] {
108
108
109
109
var mapped = [ V] ( )
110
110
@@ -123,7 +123,7 @@ internal extension Dictionary {
123
123
:param: mapFunction
124
124
:returns: Mapped dictionary
125
125
*/
126
- func mapValues < V> ( mapFunction map: ( Key , Value ) -> V ) -> [ Key : V ] {
126
+ func mapValues < V> ( map: ( Key , Value ) -> V ) -> [ Key : V ] {
127
127
128
128
var mapped = [ Key: V] ( )
129
129
@@ -142,7 +142,7 @@ internal extension Dictionary {
142
142
:param: mapFunction
143
143
:returns: Mapped dictionary
144
144
*/
145
- func mapFilterValues < V> ( mapFunction map: ( Key , Value ) -> V ? ) -> [ Key : V ] {
145
+ func mapFilterValues < V> ( map: ( Key , Value ) -> V ? ) -> [ Key : V ] {
146
146
147
147
var mapped = [ Key: V] ( )
148
148
@@ -163,7 +163,7 @@ internal extension Dictionary {
163
163
:param: mapFunction
164
164
:returns: Mapped dictionary
165
165
*/
166
- func mapFilter < K, V> ( mapFunction map: ( Key , Value ) -> ( K , V ) ? ) -> [ K : V ] {
166
+ func mapFilter < K, V> ( map: ( Key , Value ) -> ( K , V ) ? ) -> [ K : V ] {
167
167
168
168
var mapped = [ K: V] ( )
169
169
@@ -184,11 +184,11 @@ internal extension Dictionary {
184
184
:param: mapFunction
185
185
:returns: Mapped dictionary
186
186
*/
187
- func map < K, V> ( mapFunction map: ( Key , Value ) -> ( K , V ) ) -> [ K : V ] {
187
+ func map < K, V> ( map: ( Key , Value ) -> ( K , V ) ) -> [ K : V ] {
188
188
189
189
var mapped = [ K: V] ( )
190
190
191
- self . each ( eachFunction : {
191
+ self . each ( {
192
192
let ( _key, _value) = map ( 0ドル, 1ドル)
193
193
mapped [ _key] = _value
194
194
} )
@@ -202,7 +202,7 @@ internal extension Dictionary {
202
202
203
203
:param: eachFunction Function to inovke on each loop
204
204
*/
205
- func each ( eachFunction each: ( Key , Value ) -> ( ) ) {
205
+ func each ( each: ( Key , Value ) -> ( ) ) {
206
206
207
207
for (key, value) in self {
208
208
each ( key, value)
@@ -217,7 +217,7 @@ internal extension Dictionary {
217
217
:param: testFunction Function called to test each key, value
218
218
:returns: Filtered dictionary
219
219
*/
220
- func filter ( testFunction test: ( Key , Value ) -> Bool ) -> Dictionary {
220
+ func filter ( test: ( Key , Value ) -> Bool ) -> Dictionary {
221
221
222
222
var result = Dictionary ( )
223
223
@@ -239,7 +239,7 @@ internal extension Dictionary {
239
239
:param: groupingFunction
240
240
:returns: Grouped dictionary
241
241
*/
242
- func groupBy < T> ( groupingFunction group: ( Key , Value ) -> T ) -> [ T : [ Value ] ] {
242
+ func groupBy < T> ( group: ( Key , Value ) -> T ) -> [ T : [ Value ] ] {
243
243
244
244
var result = [ T: [ Value] ] ( )
245
245
@@ -265,7 +265,7 @@ internal extension Dictionary {
265
265
:param: groupingFunction Function called to define the grouping key
266
266
:returns: Grouped dictionary
267
267
*/
268
- func countBy < T> ( groupingFunction group: ( Key , Value ) -> ( T ) ) -> [ T : Int ] {
268
+ func countBy < T> ( group: ( Key , Value ) -> ( T ) ) -> [ T : Int ] {
269
269
270
270
var result = [ T: Int] ( )
271
271
0 commit comments