Seq.distinct<'T> Function (F#)
Returns a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. If an element occurs multiple times in the sequence then the later occurrences are discarded.
Namespace/Module Path: Microsoft.FSharp.Collections.Seq
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature: Seq.distinct : seq<'T> -> seq<'T> (requires equality) // Usage: Seq.distinct source
The following example demonstrates the use of Seq.distinct. The example generates the binary representation of a number as a sequence. It then determines that the only unique numbers are 0 and 1.
[1; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0] seq [1; 0]