docs: function chain(base, children = []) {
  
    function wrappedFunc(...args) {
      const baseArguments = args;
  
      let isLoaded = false;
      let shouldContinue = true;
      let result = null;
  
      function baseResult(...baseResultArgs) {
        if (shouldContinue) {
          result = base(...baseResultArgs);
        }
        return result;
      }
  
      const executionPromise = new Promise((resolve) => {
        function checkLoaded() {
          if (isLoaded) {
            return resolve(baseResult(...baseArguments));
          }
          setTimeout(checkLoaded, 0);
        }
  
        checkLoaded();
      });
  
      _.each(children, (child, name) => {
  
        if (executionPromise.hasOwnProperty(name) || !! executionPromise[name]) {
          throw new InvalidChildNameError(
            `Property already attached to execution '${name}'`
          );
        }
  
        executionPromise[name] = (...childArgs) => {
          shouldContinue = false;
          result = child(...childArgs);
          return Promise.resolve(result);
        };
  
      });
  
      isLoaded = true;
  
      return executionPromise;
    }
  
    return wrappedFunc;
  
  }