code: function resolveArgs(argumentsObject, nameMap, rightToLeft) {
    var result = {};
  
    var takeFromRight = rightToLeft;
    var args = Array.prototype.slice.call(argumentsObject);
  
    while (nameMap.length) {
      var value = null;
      var name = take(nameMap, takeFromRight);
  
      if (args.length > 0) {
        value = take(args, takeFromRight);
        takeFromRight = !takeFromRight;
      }
  
      result[name] = value;
    }
  
    return result;
  }
docs: @private
  
  @description
  
  Takes a list of arguments and maps them to a list of names
  in an alternating either a left-to-right, or right-to-left direction.