Doing a chained `map` then `detect` makes me nervous (performance wise) cpi;d we streamline this into one loop? Or instead of the `detect` use the intersection operator?

    @constraints.map { |constraints| constraints.first & COUNT_CONSTRAINTS }