-
Notifications
You must be signed in to change notification settings - Fork 35
M_CodeJam_Collections_EnumerableExtensions_CombineWithPrevious__2_1
Andrew Koryavchenko edited this page Jun 17, 2018
·
2 revisions
EnumerableExtensions.CombineWithPrevious(T, TResult) Method (IEnumerable(T), T, Func(T, T, TResult))
Combines item with previous value from the sequence.
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static IEnumerable<TResult> CombineWithPrevious<T, TResult>(
this IEnumerable<T> source,
T seed,
Func<T, T, TResult> prevNextSelector
)
VB
<ExtensionAttribute>
Public Shared Function CombineWithPrevious(Of T, TResult) (
source As IEnumerable(Of T),
seed As T,
prevNextSelector As Func(Of T, T, TResult)
) As IEnumerable(Of TResult)
F#
[<ExtensionAttribute>]
static member CombineWithPrevious :
source : IEnumerable<'T> *
seed : 'T *
prevNextSelector : Func<'T, 'T, 'TResult> -> IEnumerable<'TResult>
- source
- Type: System.Collections.Generic.IEnumerable(T)
The input sequence. - seed
- Type: T
The seed value to be used as a previous for the first 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).
EnumerableExtensions Class
CombineWithPrevious Overload
CodeJam.Collections Namespace