docs: public static <V> int sum(final List<V> values, final ToIntFunction<V> function)
      {
          int total = 0;
  
          final int size = values.size();
          for (int i = 0; i < size; i++)
          {
              final V value = values.get(i);
              total += function.applyAsInt(value);
          }
  
          return total;
      }