-
Notifications
You must be signed in to change notification settings - Fork 35
M_CodeJam_Collections_EnumerableExtensions_CombineWithNext__2
Andrew Koryavchenko edited this page Jun 17, 2018
·
2 revisions
Combines item with next value from the sequence.
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static IEnumerable<TResult> CombineWithNext<T, TResult>(
this IEnumerable<T> source,
T combineLast,
Func<T, T, TResult> prevNextSelector
)
VB
<ExtensionAttribute>
Public Shared Function CombineWithNext(Of T, TResult) (
source As IEnumerable(Of T),
combineLast As T,
prevNextSelector As Func(Of T, T, TResult)
) As IEnumerable(Of TResult)
F#
[<ExtensionAttribute>]
static member CombineWithNext :
source : IEnumerable<'T> *
combineLast : 'T *
prevNextSelector : Func<'T, 'T, 'TResult> -> IEnumerable<'TResult>
- source
- Type: System.Collections.Generic.IEnumerable(T)
The input sequence. - combineLast
- Type: T
The value to be used as a next for the last item in the sequence. - prevNextSelector
- Type: System.Func(T, T, TResult)
The previous next selector.
- T
- The type of the item.
- TResult
- The type of the result.
Type: IEnumerable(TResult)
Sequence of items combined with previous values from the sequence.
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable(T). 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).