Seq.initInfinite<'T> Function (F#)
Generates a new sequence which, when iterated, will return successive elements by calling the given function.
Namespace/Module Path: Microsoft.FSharp.Collections.Seq
Assembly: FSharp.Core (in FSharp.Core.dll)
The results of calling the function will not be saved, that is the function will be reapplied as necessary to regenerate the elements. The function is passed the index of the item being generated.
Iteration can continue up to Int32.MaxValue.
This function is named InitializeInfinite in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.
The following example shows the use of Seq.initInfinite to create a sequence 1/n^2, with alternating signs.
seq [-1.0; 0.25; -0.1111111111; 0.0625; ...]