code: private static boolean startsWith(List<?> list, List<?> other) {
      return list.size() >= other.size() && list.subList(0, other.size()).equals(other);
    }
docs: Returns true if list starts with all elements of other in the same order.