忽略重複的值

有兩個運算子用於過濾重複項:

emails.Distinct(); // Never see the same value twice
emails.DistinctUntilChanged(); // Never see the same value twice in a row

你還可以傳入謂詞:

emails.DistinctUntilChanged(x => x.Length); // Never see the same length email twice in a row