docs: function () {
  
          $global.TaskPool = $prototype ({
  
              constructor: function (cfg) {
                              
                              this.maxTime        = cfg && cfg.maxTime
                              this.pending        = []
  
                              if (this.maxConcurrency = cfg && cfg.maxConcurrency) {
                                  this.numActive = 0
                                  this.queue     = [] } },
  
              run: function (task) { var self = this
  
                          if (this.numActive >= this.maxConcurrency) { // queue task
  
                              return new Promise (function (resolve) {
                                                      self.queue.push (function () {
                                                                          return self.run  (task)
                                                                                     .then (resolve) }) }) }
                          else { // execute task
  
                              var p = __(task)
  
                              if (this.maxTime !== undefined) {
                                  p = p.timeout (this.maxTime) }
  
                              if (this.maxConcurrency !== undefined) { // if queueing, wait until complete and pop next task
  
                                                             self.numActive++
                                  p = p.then (function (x) { self.numActive--
  
                                                     return (self.queue.length &&
                                                            (self.numActive < self.maxConcurrency))
                                                                            ? self.queue.shift () ().then (_.constant (x))
                                                                            : x }) }
                              this.pending.push (p)
  
                              return p } },
  
  
              all: $property (function () {
                                  return Promise.all (this.pending) }) }) // @hide
  
      /*  ------------------------------------------------------------------------ */
  
          __.scatter = function (x, fn, cfg /* { maxConcurrency, maxTime } */) {
  
                      return __.then (x, function (x) {
  
                          if (_.isStrictlyObject (x)) {
  
                              var result = _.coerceToEmpty (x),
                                  tasks  = new TaskPool (cfg)
  
                              _.each2 (x, function (v, k) {
                                              tasks.run (fn.$ (v, k, x)).then (
                                                                          function (vk) {
                                                                              if (vk) {
                                                                                  result[vk[1]] = vk[0] } }) })
                              return tasks.all.then (_.constant (result)) }
  
                          else {
                              return __(fn, x, undefined, x).then (function (vk) { return vk[0] }) } }) }
  }