code: function log(prefix) {
      return logTask;
  
      function logTask(value) {
        if ("undefined" !== console && console.log instanceof Function) {
          if (prefix) {
            console.log(prefix, value);
          } else {
            console.log(value);
          }
        }
        return resolve(value);
      }
    }
docs: creates a promise-returning function which inspects value to console.log() for debug purpose.
  
  @class promisen
  @static
  @function log
  @param [prefix] {String}
  @returns {Function} promise-returning function
  @example
  var promisen = require("promisen");
  
  var task3 = promisen(task1, promisen.log("result:"), task2);
  
  task3().then(function() {...});