docs: function waterfall(tasks) {
      if (tasks === null) return promisen(tasks);
      if (tasks == null) return promisen();
      tasks = Array.prototype.map.call(tasks, wrap);
      return composite;
  
      // composite multiple tasks
      function composite(value) {
        return tasks.reduce(chain.bind(this), resolve(value));
      }
  
      // apply the first argument only. ignore rest.
      function wrap(task) {
        return promisen(task);
      }
  
      // chain tasks
      function chain(promise, func) {
        return promise.then(func.bind(this));
      }
    }