code: function promisen(task) {
      if (arguments.length > 1) return waterfall(arguments);
      if (task instanceof Function) return executable;
      if (!arguments.length) return resolve;
      return constant;
  
      // return the constant value
      function constant() {
        return resolve(task);
      }
  
      // return a result from the function
      function executable(value) {
        var result;
        try {
          result = resolve(task.apply(this, arguments));
        } catch (e) {
          result = reject(e);
        }
        return result;
      }
    }
docs: creates a promise-returning function from plain function or objects below:
  
  1. function
  2. promise object
  3. thenable object
  4. any other constant object or value
  5. multiple values of above
  
  @class promisen
  @static
  @function promisen
  @param task {...(Function|Promise|thenable|*)}
  @returns {Function}
  @see https://www.npmjs.com/package/es6-promise
  @see promisen.waterfall()
  @example
  var promisen = require("promisen");
  
  // wrap a single function
  var wrapped = promisen(function() {...});
  wrapped(value).then(function(result) {...});
  
  // composite multiple tasks
  var joined = promisen(func, promise, thenable, object);
  joined(value).then(function(result) {...});