List.forall2<'T1,'T2> Function (F#)
Visual Studio 2012
Tests if all corresponding elements of the collection satisfy the given predicate pairwise.
Namespace/Module Path: Microsoft.FSharp.Collections.List
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature:
List.forall2 : ('T1 -> 'T2 -> bool) -> 'T1 list -> 'T2 list -> bool
// Usage:
List.forall2 predicate list1 list2
The predicate is applied to matching elements in the two collections. If any application returns false then the overall result is false and no further elements are tested. Otherwise, if one collection is longer than the other then the ArgumentException exception is raised. Otherwise, true is returned.
This function is named ForAll2 in compiled assemblies. If you are accessing the function from a .NET language other than F#, or through reflection, use this name.