Seq.iteri<'T> Function (F#)
Applies the given function to each element of the collection. The integer passed to the function indicates the index of element.
Namespace/Module Path: Microsoft.FSharp.Collections.Seq
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature: Seq.iteri : (int -> 'T -> unit) -> seq<'T> -> unit // Usage: Seq.iteri action source
The following code shows how to use Seq.iteri and compares its behavior to related functions.
Seq.iter: element is 1 Seq.iter: element is 2 Seq.iter: element is 3 Seq.iteri: element 0 is 1 Seq.iteri: element 1 is 2 Seq.iteri: element 2 is 3 Seq.iter2: elements are 1 4 Seq.iter2: elements are 2 5 Seq.iter2: elements are 3 6