class MapStream implements Stream<Map.Entry<K, V>> {

  public <R> Stream<R> map(BiFunction<? super K, ? super V, ? extends R> mapper) {
    return underlying.map(e -> mapper.apply(e.getKey(), e.getValue()));
  }

  private  MapStream(Stream<Map.Entry<K, V>> underlying);

}