Couldn't you use setIntersection together with reduce?

Doesn't seem like the most efficient solution, but its less typing and most likely will have no bugs.

Reply via email to