private static <T> Pair<List<T>, List<T>> partition(Iterable<? extends T> iterable, Predicate<? super T> predicate) {
      List<T> list1 = new SmartList<>();
      List<T> list2 = new SmartList<>();
      for (T value : iterable) {
        if (predicate.test(value)) {
          list1.add(value);
        } else {
          list2.add(value);
        }
      }
      return new Pair<>(list1, list2);
    }
private static <T> Pair<List<T>, List<T>> partition(Iterable<? extends T> iterable, Predicate<? super T> predicate)