ko1 / rubyhackchallenge

472 stars 83 forks source link

Array#overlap?(array) #69

Open fcheung opened 5 years ago

fcheung commented 5 years ago

Semantically equivalent to (array1 & array2).any? but doesn't create an intermediate array & can return as soon as one element in common is found

fcheung commented 5 years ago

https://github.com/ruby/ruby/pull/2260