MoreEnumerableGroupAdjacentTSource, TKey, TElement(IEnumerableTSource, FuncTSource, TKey, FuncTSource, TElement, IEqualityComparerTKey) Method
            Groups the adjacent elements of a sequence according to a
            specified key selector function. The keys are compared by using
            a comparer and each group's elements are projected by using a
            specified function.
            
Namespace: MoreLinqAssembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
public static IEnumerable<IGrouping<TKey, TElement>> GroupAdjacent<TSource, TKey, TElement>(
	this IEnumerable<TSource> source,
	Func<TSource, TKey> keySelector,
	Func<TSource, TElement> elementSelector,
	IEqualityComparer<TKey>? comparer
)
<ExtensionAttribute>
Public Shared Function GroupAdjacent(Of TSource, TKey, TElement) ( 
	source As IEnumerable(Of TSource),
	keySelector As Func(Of TSource, TKey),
	elementSelector As Func(Of TSource, TElement),
	comparer As IEqualityComparer(Of TKey)
) As IEnumerable(Of IGrouping(Of TKey, TElement))
public:
[ExtensionAttribute]
generic<typename TSource, typename TKey, typename TElement>
static IEnumerable<IGrouping<TKey, TElement>^>^ GroupAdjacent(
	IEnumerable<TSource>^ source, 
	Func<TSource, TKey>^ keySelector, 
	Func<TSource, TElement>^ elementSelector, 
	IEqualityComparer<TKey>^ comparer
)
[<ExtensionAttribute>]
static member GroupAdjacent : 
        source : IEnumerable<'TSource> * 
        keySelector : Func<'TSource, 'TKey> * 
        elementSelector : Func<'TSource, 'TElement> * 
        comparer : IEqualityComparer<'TKey> -> IEnumerable<IGrouping<'TKey, 'TElement>> 
- source  IEnumerableTSource
- A sequence whose elements to group.
- keySelector  FuncTSource, TKey
- A function to extract the key for each
            element.
- elementSelector  FuncTSource, TElement
- A function to map each source
            element to an element in the resulting grouping.
- comparer  IEqualityComparerTKey
- An IEqualityComparerT to
            compare keys.
- TSource
- The type of the elements of
            source.
- TKey
- The type of the key returned by
            keySelector.
- TElement
- The type of the elements in the
            resulting groupings.
IEnumerableIGroupingTKey, 
TElementA sequence of groupings where each grouping
            (
IGroupingTKey, TElement) contains the key
            and the adjacent elements (of type 
TElement)
            in the same order as found in the source sequence.In Visual Basic and C#, you can call this method as an instance method on any object of type 
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).
 
            This method is implemented by using deferred execution and
            streams the groupings. The grouping elements, however, are
            buffered. Each grouping is therefore yielded as soon as it
            is complete and before the next grouping occurs.