function applyPitchLoaders(request, loaders, done) {
  var requestFragments = request.split(/\!/g);

  (function applyPitchLoader(cursor, dataMap) {
    var loader = loaders[cursor];

    if (!loader) {
      return done(null, {
        cursor: null,
        sourceCode: null,
        sourceMap: null,
        dataMap: dataMap,
      });
    }
    else if (!loader.module.pitch) {
      return applyPitchLoader(cursor + 1, dataMap);
    }
    else {
      // pitch loader, when applied, may modify any of these context variables:
      //
      // - this.resourcePath
      // - this.resourceQuery
      // - this.resource
      // - this.loaderIndex (TODO: why would this be modified? does it affect the run order?!)
      applySyncOrAsync(loader.module.pitch, loader.context, [
        requestFragments.slice(cursor+1).join('!'),
        requestFragments.slice(0, cursor).join('!'),
        dataMap[cursor]
      ], function(err, sourceCode, sourceMap) {
        if (err) {
          done(err);
        }
        else if (sourceCode) {
          done(null, {
            cursor: cursor,
            sourceCode: sourceCode,
            sourceMap: sourceMap,
            dataMap: dataMap,
          });
        }
        else {
          applyPitchLoader(cursor + 1, dataMap);
        }
      });
    }
  }(0, loaders.map(function() { return {}; })));
}
If this ain't a monster, I don't know what is.


              .'''''-,              ,-`````.
              `-.._  |              |  _..-'
                 \    `,          ,'    /
                 '=   ,/          \,   =`
                 '=   (            )   =`
                .\    /            \    /.
               /  `,.'              `.,'  \
               \   `.                ,'   /
                \    \              /    /
                 \   .`.  __.---. ,`.   /
                  \.' .'``        `. `./
                   \.'  -'''-..     `./
                   /  /        '.      \
                  /  / .--  .-'''`      '.
                 '   |    ,---.    _      \
     /``-----._.-.   \   / ,-. '-'   '.   .-._.-----``\
     \__ .     | :    `.' ((O))   ,-.  \  : |     . __/
      `.  '-...\_`     |   '-'   ((O)) |  '_/...-`  .'
 .----..)    `    \     \      /  '-'  / /    '    (..----.
(o      `.  /      \     \    /\     .' /      \  .'      o)
 ```---..   `.     /`.    '--'  '---' .'\     .'   ..---```
         `-.  `.  /`.  `.           .' .'\  .'  .-'
            `..` /   `.'  ` - - - ' `.'   \ '..'
                /    /                \    \
               /   ,'                  `.   \
               \  ,'`.                .'`.  /
                `/    \              /    \'
                 ,=   (              )   =,
                 ,=   '\            /`   =,
   LGB           /    .'            `.    \
              .-'''  |                |  ```-.
              `......'                `......'

@param {Object}            runContext
@param {HappyFakeCompiler} runContext.compiler
@param {Array.<Object>}    runContext.loaders
@param {Object}            runContext.loaderContext

@param {String}            runContext.loaderContext.remoteLoaderId
       The ID of the HappyLoader instance that initiated this compilation
       request.

@param {String}            runContext.loaderContext.request
       The full request for the resource including the loader chain string.
       Something like:
         '/path/to/style-loader.js!/path/to/css-loader.js!/path/to/resource.css'

@param {String}            runContext.loaderContext.context
       The directory of the resource, useful for resolving siblings.

@param {String}            runContext.loaderContext.resource
       The resource path without the loader chain. This includes the file
       and the query fragment.

@param {String}            runContext.loaderContext.resourcePath
       The resource file.

@param {String}            runContext.loaderContext.resourceQuery
       The resource query.

@param {String}            sourceCode
@param {Object}            sourceMap

@param {Function}          done
@param {String|Error}      done.err
@param {String}            done.sourceCode
@param {Object}            done.sourceMap