code: public final Object f(Object... args) {
      return dfd != null &&
          (cache == CacheType.ALL ||
              cache == CacheType.RESOLVED && dfd.promise().isResolved() ||
          cache == CacheType.REJECTED && dfd.promise().isRejected())
          ? dfd.promise()
          : new PromiseFunction() {
            public void f(Deferred dfd) {
              FunctionDeferred.this.resolve = resolve;
              FunctionDeferred.this.reject = reject;
              FunctionDeferred.this.dfd = dfd;
              FunctionDeferred.this.f(dfd);
            }
          };
    }
docs: This function is called when the previous promise in the pipe
  is resolved.