class Array def adjacent_pairs self[0..-2].zip(self[1..-1]) end end