phpstreams\operations\DistinctOperation::unsortedIterator PHP Method

unsortedIterator() private method

This iterator compares the value to all previously found values to decide on uniqueness.
private unsortedIterator ( )
    private function unsortedIterator()
    {
        $data = [];
        foreach ($this->source as $key => $value) {
            if (!in_array($value, $data, $this->strict)) {
                $data[] = $value;
                (yield $key => $value);
            }
        }
    }