code: public static <T> C.List<T> toList(Iterable<? extends T> iterable) {
          if (iterable instanceof Collection) {
              return toList((Collection<T>) iterable);
          }
          ListBuilder<T> lb = new ListBuilder<T>(10);
          for (T t : iterable) {
              lb.add(t);
          }
          return lb.toList();
      }
docs: Returns an immutable {@link C.List} from iterable
  @param iterable the iterable
  @param <T> the element type
  @return an immutable list contains all elements from the iterable