title: ngrx EffectsModule - Need assistance in understanding providers usage
body: <p>I am trying to understand the use of provider factory in Angular.
  I understand the examples provided in <a href="https://angular.io/api/core/FactoryProvider" rel="noreferrer">Angular Documentation</a>.</p>
  
  <p>However, I have encountered a rather unusual usage of provider factory in <a href="https://github.com/ngrx/platform/blob/master/modules/effects/src/effects_module.ts" rel="noreferrer">ngrx EffectsModule (effects_module.ts)</a>.</p>
  
  <pre><code>@NgModule({})
  export class EffectsModule {
    static forFeature(featureEffects: Type&lt;any&gt;[]): ModuleWithProviders {
      return {
        ngModule: EffectsFeatureModule,
        providers: [
          featureEffects,
          {
            provide: FEATURE_EFFECTS,
            multi: true,
            deps: featureEffects,
            useFactory: createSourceInstances,
          },
        ],
      };
    }
  
    // *** &lt;snip&gt; forRoot method for brevity
  
  }
  export function createSourceInstances(...instances: any[]) {
    return instances;
  }
  </code></pre>
  
  <p>I understand the purpose of <code>multi:true</code>.</p>
  
  <p>However, I am having hard time to figure why would <code>featureEffects</code> be declared as providers, and as well be used as dependency for <code>FEATURE_EFFECTS</code> - and what does <code>createSourceInstances(...instances: any[])</code> achieve?</p>
  
  <p>What is this pattern and where can one use it?</p>