code: public StreamEx<T> collapse(BiPredicate<? super T, ? super T> collapsible) {
          return collapse(collapsible, selectFirst());
      }
docs: Returns a stream consisting of elements of this stream where every series
  of elements matched the predicate is replaced with first element from the
  series.
  
  <p>
  This is a <a href="package-summary.html#StreamOps">quasi-intermediate</a>
  partial reduction operation.
  
  <p>
  This operation is equivalent to
  {@code collapse(collapsible, MoreCollectors.first()).map(Optional::get)}
  , but more efficient.
  
  <p>
  Note that this operation always tests the adjacent pairs of input
  elements. In some scenarios it's desired to test every element with the
  first element of the current series. In this case consider using
  {@link MoreCollectors#dominators(BiPredicate)} collector instead.
  
  <p>
  For sorted stream {@code collapse(Objects::equals)} is equivalent to
  {@code distinct()}.
  
  @param collapsible a non-interfering, stateless predicate to apply to the
  pair of adjacent input elements which returns true for elements
  which are collapsible.
  @return the new stream
  @see MoreCollectors#dominators(BiPredicate)
  @since 0.3.1