code: 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));
      }
    }
docs: creates a promise-returning function which runs multiple tasks in order.
  
  @class promisen
  @static
  @function waterfall
  @param tasks {Array|Array-like} list of tasks
  @returns {Function} promise-returning function
  @example
  var promisen = require("promisen");
  
  // generate a promise-returning function
  var task = promisen.waterfall([task1, task2, task3,...]);
  
  // execute it
  task(value).then(function(result) {...});
  
  // execute it with target object which is passed to every tasks
  task.call(target, value).then(function(result) {...});