Seq.iter2<'T1,'T2> Function (F#)
Applies the given function to two collections simultaneously. If one sequence is shorter than the other then the remaining elements of the longer sequence are ignored.
Namespace/Module Path: Microsoft.FSharp.Collections.Seq
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature: Seq.iter2 : ('T1 -> 'T2 -> unit) -> seq<'T1> -> seq<'T2> -> unit // Usage: Seq.iter2 action source1 source2
Thrown when either of the input sequences is null.
The following code shows how to use Seq.iter2 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