def prefix?(other)
      other = other.to_key_path
      return false if other.length > length

      key_enum = each
      other.all? { |other_key| key_enum.next == other_key }
    end
def prefix?(other)
      other = other.to_key_path
      return false if other.length > length

      key_enum = each
      other.all? { |other_key| key_enum.next == other_key }
    end
Is +other+ a prefix?

 :call-seq:
   prefix?(other) => boolean