Sequence Iterate T  Method (T, Int32, Func T, T )A Sandcastle Documented Class Library
Creates a finite sequence of a given length that repeatedly applies a given function to a start value.

Namespace: Sequences
Assembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax
public static ISequence<T> Iterate<T>(
	T start,
	int length,
	Func<T, T> func
)

Parameters

start
Type: T
The first value of the sequence.
length
Type: System Int32
The number of elements in the sequence.
func
Type: System Func T, T 
The function that's repeatedly applied to the last element to produce the next element.
Type Parameters
T
The type of the elements in the sequence.

Return Value

Type: ISequence T 
A finite sequence of length length obtained by repeatedly applying func to start.
See Also