code: public <T> T apply(final FormulaFunction<T> function, final boolean cache) {
          return function.apply(this, cache);
      }
docs: Applies a given function on this formula and returns the result.
  @param function the function
  @param cache    indicates whether the result should be cached in this formula's cache
  @param <T>      the result type of the function
  @return the result of the function application