From: Robert Dober Date: 2010-04-24T07:31:38+09:00 Subject: Re: Best way to write this method? On Fri, Apr 23, 2010 at 6:53 PM, Derek Cannon wrote: Hmm? Do I miss something here? def arys_distinct? aa, ba (aa.map(&:to_a).flatten & ba.map(&:to_a).flatten).empty? end def overlaps? a, b a.any?{ |aday, ar| b.any?{ |bday, br| aday == bday && !arys_distinct?(ar, br) } } end -- The best way to predict the future is to invent it. -- Alan Kay