/// <summary> /// <para>Emits true and completes on completion if all items emitted satisfy predicate, or false and /// completes imediately if the predicate fails on any item</para> /// /// <para>All implementation using Where, Select and FirstOrDefault</para> /// </summary> public static IObservable <bool> Contains <T>(this IObservable <T> source, T item) { var comparer = Comparer <T> .Default; return(source.Any((t, i) => comparer.Compare(t, item) >= 0)); }