public function unique(callable $comparator = null)
    {
        if (!$comparator) {
            $this->source = array_values(array_unique($this->source));
        }

        return $this;
    }
public function unique(callable $comparator = null)
    {
        if (!$comparator) {
            $this->source = array_values(array_unique($this->source));
        }

        return $this;
    }
public function unique ( callable $ comparator = null ) { if ( ! $ comparator ) { $ this -> source = array_values ( array_unique ( $ this -> source ) ) ; } return $ this ; }
Remove duplicates.

@param callable $comparator (optional)

@return self
Remove duplicates .