Returns a stateful <code>Function</code> which should not be used in parallel stream.

@param func
@return
@deprecated replaced by {@code Functions#indexed(IndexedFunction)}.
177941
@Deprecated
    static <T, R> Function<T, R> indexedd(final IndexedFunction<T, R> func) {
        return Functions.indexed(func);
    }
480091
public static <A, B> Multiset<B> mutableTransformedCopy(Multiset<A> ms,
      Function<A, B> func) {
    final Multiset<B> ret = HashMultiset.create();

    for (final Multiset.Entry<A> entry : ms.entrySet()) {
      final B transformedElement = func.apply(entry.getElement());
      ret.add(transformedElement, entry.getCount());
    }

    return ret;
  }
823697
private <R> Future<R> scheduleAsync(Callable<R> func) {
        return executor.submit(func);
    }
283310
public static <T, R, E extends Exception> Function<T, R> sneaked(
      SneakyFunction<T, R, E> function) {
    return t -> {
      @SuppressWarnings("unchecked")
      SneakyFunction<T, R, RuntimeException> f1 = (SneakyFunction<T, R, RuntimeException>) function;
      return f1.apply(t);
    };
  }
81531
public static <T0, R> FuncN<R> fromFunc(final Func1<? super T0, ? extends R> f) {
        return new FuncN<R>() {

            @SuppressWarnings("unchecked")
            @Override
            public R call(Object... args) {
                if (args.length != 1) {
                    throw new RuntimeException("Func1 expecting 1 argument.");
                }
                return f.call((T0) args[0]);
            }

        };
    }
157711
public static <T> ToIntFunction<T> toIntFunction(CheckedToIntFunction<T> function) {
        return toIntFunction(function, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
1078510
public void toSelf(def<T> func) {
                $((List<T>) iterable).forEach(e -> {
                        return Set(func.apply(e));
                });
        }
571324
public FluentMatchingR<T, R> get(Function2<A, B, R> function) {
    return get(fluentMatchingR, function);
  }
1358930
public static <F, T, KeyT extends F, TestT extends F>
  Function<EvalPair<? extends KeyT, ? extends TestT>, EvalPair<T, T>> functionOnBoth(
      final Function<F, T> func) {
    return new Function<EvalPair<? extends KeyT, ? extends TestT>, EvalPair<T, T>>() {
      @Override
      public EvalPair<T, T> apply(final EvalPair<? extends KeyT, ? extends TestT> input) {
        return EvalPair.of(func.apply(input.key()), func.apply(input.test()));
      }

      @Override
      public String toString() {
        return "EvalPair.functionOnBoth(" + func + ")";
      }
    };
  }
597593
@Deprecated
  public static <K, V> Function<Map.Entry<K, V>, V> getEntryValue() {
    return entryValueFunction();
  }
1246685
public static <T1, T2, R> FluentFunctions.FluentBiFunction<T1, T2, R> ofChecked(final CheckedBiFunction<T1, T2, R> fn) {
        return FluentFunctions.of(ExceptionSoftener.softenBiFunction(fn));
    }
108523
public static <T, R> Function1<T, R> memoizeFunction(final Function<T, R> fn, final Cacheable<R> cache) {
        LazyImmutable<R> nullR = LazyImmutable.def();
        return t -> t==null? nullR.computeIfAbsent(()->fn.apply(null)) : (R)cache.soften()
                         .computeIfAbsent(t, (Function) fn);
    }
1260597
public static <T> ToLongFunction<T> toLongFunction(CheckedToLongFunction<T> function) {
        return Unchecked.toLongFunction(function, Unchecked.RETHROW_ALL);
    }
225745
@Deprecated
    public static <I extends Request, O extends Response>
    Function<Client<I, O>, LoggingClient<I, O>> newDecorator(LogLevel level) {
        return delegate -> new LoggingClient<>(delegate, level);
    }
144469
@SneakyThrows
    public static <T, R> Function<T, R> doIf(final Predicate<Object> condition, final Supplier<R> trueFunction,
                                             final Supplier<R> falseFunction) {
        return t -> {
            try {
                if (condition.test(t)) {
                    return trueFunction.get();
                }
                return falseFunction.get();
            } catch (final Throwable e) {
                LOGGER.warn(e.getMessage(), e);
                return falseFunction.get();
            }
        };
    }
561674
public static <T, U> ToDoubleBiFunction<T, U> toDoubleBiFunction(CheckedToDoubleBiFunction<T, U> function) {
        return toDoubleBiFunction(function, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
131684
def get_func(func, aliasing, implementations):
    
    try:
        func_str = aliasing[func]
    except KeyError:
        if callable(func):
            return func
    else:
        if func_str in implementations:
            return func_str
        if func_str.startswith('nan') and \
                func_str[3:] in funcs_no_separate_nan:
            raise ValueError("%s does not have a nan-version".format(func_str[3:]))
        else:
            raise NotImplementedError("No such function available")
    raise ValueError("func %s is neither a valid function string nor a "
                     "callable object".format(func))