On Wednesday, 9 September 2015 at 20:28:35 UTC, Laeeth Isharc wrote:

so setIntersection(arg[0],arg[1],arg[2] .. arg[$-1])
except that I don't know how many series are in arg at compile time.

what's the most efficient way to use Phobos to find these? (I could write a loop, but I am trying to learn how to use std.algorithm better).

I'd use something like this, it works in O(Σ|arg[i]| * log|arg.length|)
arg.nWayUnion.group.filter!(g => g[1] == arg.length).map!(g => g[0]).array

Reply via email to