Rx\Observable::distinct PHP Method

distinct() public method

Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public distinct ( callable $comparer = null ) : Rx\Observable\AnonymousObservable
$comparer callable
return Rx\Observable\AnonymousObservable
    public function distinct(callable $comparer = null)
    {
        return $this->lift(function () use($comparer) {
            return new DistinctOperator(null, $comparer);
        });
    }