code: function(desc, f) {
      if (typeof desc === 'object') {
          f(desc.env);
          if (Array.isArray(desc.components)) {
              desc.components.forEach(function(x) { patchEnv(x, f);});
          }
      } else {
          var err = new Error('patchEnv: not an object');
          err['desc'] = desc;
          throw err;
      }
  }
docs: Patches every environment in a description.
  
  @param {specType} desc A description to patch.
  @param {function(Object)} f A function to patch an environment.