code: public final <K> Map<K, T> toMap(IxFunction<? super T, ? extends K> keySelector) {
          return this.<K>collectToMap(keySelector).first();
      }
docs: Collects the elements of this sequence into a Map where the key is
  determined from each element via the keySelector function; duplicates are
  overwritten.
  <p>
  @param <K> the key type
  @param keySelector the function that receives the current element and returns
  a key for it to be used as the Map key.
  @return the new Map instance
  @throws NullPointerException if keySelector is null
  @since 1.0