code: @SuppressWarnings("unchecked")
      public <R> ScoredValue<R> map(Function<? super V, ? extends R> mapper) {
  
          LettuceAssert.notNull(mapper, "Mapper function must not be null");
  
          if (hasValue()) {
              return new ScoredValue<>(score, mapper.apply(getValue()));
          }
  
          return (ScoredValue<R>) this;
      }
docs: Returns a {@link ScoredValue} consisting of the results of applying the given function to the value of this element.
  Mapping is performed only if a {@link #hasValue() value is present}.
  
  @param <R> The element type of the new stream
  @param mapper a stateless function to apply to each element
  @return the new {@link ScoredValue}