module FDB::Tuple

def self.compare(tuple1, tuple2)

def self.compare(tuple1, tuple2)
  i = 0
  while i < tuple1.length && i < tuple2.length
    c = self._compare_elems(tuple1[i], tuple2[i])
    return c unless c == 0
    i += 1
  end
  tuple1.length <=> tuple2.length
end