code: public static <T> Sequence<T> sort(final Sequence<T> sequence, final Comparator<T> comparator)
    {
      List<T> seqList = sequence.toList();
      Collections.sort(seqList, comparator);
      return simple(seqList);
    }
docs: This will materialize the entire sequence in memory. Use at your own risk.