Some common binary operations come with a separate method that reduces a collection with it; for instance sum
is the reduction form of +
or prod
is the reduction form of *
. Is there a reduction form for intersect
and union
, i.e., functions that are equivalent to f(v) = reduce(intersect, v)
and g(v) = reduce(union, v)
?
It would make some sense to overload any
and all
to do this, if nothing exists already.