Rather than map {}.any? would it be more efficient to use Enumerable#detect? That would stop at the first matching instance rather than always iterating over the entire list.