 | GeneratorIterateTSource Method (IEnumerableTSource, FuncIListTSource, TSource) |
Makes a generator that uses an iterator function to generate elements.
Namespace:
Gamelogic.Extensions.Algorithms
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntaxpublic static IGenerator<TSource> Iterate<TSource>(
IEnumerable<TSource> initialElements,
Func<IList<TSource>, TSource> iterator
)
Parameters
- initialElements
- Type: System.Collections.GenericIEnumerableTSource
The initial elements. - iterator
- Type: SystemFuncIListTSource, TSource
The iterator function.
Type Parameters
- TSource
- The type of elements to generate.
Return Value
Type:
IGeneratorTSource
Exceptions
RemarksUses the last n elements to generate the next one, where n is the same
number of elements as is provided initially.
See Also