code: function(step, next) {
        var SpawnState, oldNext, state;
        state = null;
        SpawnState = (function() {
  
          function SpawnState(step, callback) {
            this.callback = callback;
            this.spawn = __bind(this.spawn, this);
  
            this.threadCount = -1;
            this.returnedThreads = -1;
            this.returnValues = {};
          }
  
          SpawnState.prototype.spawn = function() {
            var threadId,
              _this = this;
            this.threadCount++;
            threadId = this.threadCount;
            return function() {
              if (_this.returnValues[threadId] != null) {
                throw "A spawn's callback can not be called multiple times!";
              }
              _this.returnValues[threadId] = ((function() {
                switch (arguments.length) {
                  case 0:
                    return null;
                  case 1:
                    return arguments[0];
                  default:
                    return copyArray(arguments);
                }
              }).apply(_this, arguments));
              _this.returnedThreads++;
              return _this.checkIfAllReturned();
            };
          };
  
          SpawnState.prototype.checkIfAllReturned = function() {
            if (this.returnValues.length && this.returnedThreads === this.threadCount) {
              this.callback.apply(null, copyArray(this.returnValues));
              return state = null;
            }
          };
  
          SpawnState.prototype.doneSpawning = function() {
            this.returnValues.length = this.threadCount + 1;
            return this.checkIfAllReturned();
          };
  
          return SpawnState;
  
        })();
        oldNext = step.next;
        step.spawn = function() {
          if (!state) {
            state = new SpawnState(step, oldNext);
          }
          return state.spawn();
        };
        step.next = function() {
          if (state === null) {
            return oldNext.apply(null, arguments);
          } else {
            return state.doneSpawning();
          }
        };
        return next();
      }
docs: /*{"name":"ctrl.builders.spawn", "priority":5}
  This builder adds the `spawn()` function to step object allowing
  parallel operations.