IEnumerable <TResult> FlatJoinCore <TInner1, TInner2, TInner3, TInner4, TJoinKey, TResult>(IMemoryFinder <TJoinKey, TInner1> innerMemory1, IMemoryFinder <TJoinKey, TInner2> innerMemory2, IMemoryFinder <TJoinKey, TInner3> innerMemory3, IMemoryFinder <TJoinKey, TInner4> innerMemory4, Func <TOuter, TJoinKey> keySelector, Func6 <TOuter, TInner1, TInner2, TInner3, TInner4, TResult> resultSelector, bool defaultIfEmpty)
        {
            foreach (var outer in outerList)
            {
                var key        = keySelector(outer);
                var inner1Many = DefaultIfEmpty(innerMemory1.FindMany(key), defaultIfEmpty);
                var inner2Many = DefaultIfEmpty(innerMemory2.FindMany(key), defaultIfEmpty);
                var inner3Many = DefaultIfEmpty(innerMemory3.FindMany(key), defaultIfEmpty);
                var inner4Many = DefaultIfEmpty(innerMemory4.FindMany(key), defaultIfEmpty);

                foreach (var inner1 in inner1Many)
                {
                    foreach (var inner2 in inner2Many)
                    {
                        foreach (var inner3 in inner3Many)
                        {
                            foreach (var inner4 in inner4Many)
                            {
                                yield return(resultSelector(outer, inner1, inner2, inner3, inner4));
                            }
                        }
                    }
                }
            }
        }
 IEnumerable <TResult> GroupJoinCore <TInner, TJoinKey, TResult>(IMemoryFinder <TJoinKey, TInner> innerMemory, Func <TOuter, TJoinKey> keySelector, Func <TOuter, RangeView <TInner>, TResult> resultSelector)
 {
     foreach (var outer in outerList)
     {
         var inner = innerMemory.FindMany(keySelector(outer));
         yield return(resultSelector(outer, inner));
     }
 }
 IEnumerable <TResult> GroupJoinCore <TInner1, TInner2, TJoinKey, TResult>(IMemoryFinder <TJoinKey, TInner1> innerMemory1, IMemoryFinder <TJoinKey, TInner2> innerMemory2, Func <TOuter, TJoinKey> keySelector, Func <TOuter, RangeView <TInner1>, RangeView <TInner2>, TResult> resultSelector)
 {
     foreach (var outer in outerList)
     {
         var key    = keySelector(outer);
         var inner1 = innerMemory1.FindMany(key);
         var inner2 = innerMemory2.FindMany(key);
         yield return(resultSelector(outer, inner1, inner2));
     }
 }
        IEnumerable <TResult> FlatJoinCore <TInner, TJoinKey, TResult>(IMemoryFinder <TJoinKey, TInner> innerMemory1, Func <TOuter, TJoinKey> keySelector, Func <TOuter, TInner, TResult> resultSelector, bool defaultIfEmpty)
        {
            foreach (var outer in outerList)
            {
                var key        = keySelector(outer);
                var inner1Many = DefaultIfEmpty(innerMemory1.FindMany(key), defaultIfEmpty);

                foreach (var inner1 in inner1Many)
                {
                    yield return(resultSelector(outer, inner1));
                }
            }
        }