Skip to content
This repository has been archived by the owner. It is now read-only.

Adblocker + Control Center API #27

Closed
wants to merge 5 commits into from

Conversation

@timoteipalade
Copy link
Contributor

@timoteipalade timoteipalade commented Apr 23, 2018

No description provided.

let key = key(elem)
if var dict_array = dict[key] {
dict_array.append(elem)
dict[key] = dict_array

This comment has been minimized.

@mahmoud-adam85

mahmoud-adam85 May 7, 2018
Contributor

I think this line is redundant


public func groupAndReduce<B:Hashable, C>(byKey: (Element) -> B, reduce: ([Element]) -> C) -> Dictionary<B, C> {
let dict = self.groupBy(key: byKey)
var reduceDict: Dictionary<B,C> = [:]

This comment has been minimized.

@mahmoud-adam85

mahmoud-adam85 May 7, 2018
Contributor

return dict.reduceValues instead of duplicating the code

This comment has been minimized.

@timoteipalade

timoteipalade May 8, 2018
Author Contributor

Yap. Thank you!

@timoteipalade
Copy link
Contributor Author

@timoteipalade timoteipalade commented May 8, 2018

the commits here are part of the Control Center branch. They will be merged from there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants