Pinq\Iterators\IIteratorScheme::uniqueKeyIterator PHP Method

uniqueKeyIterator() public method

Returns an iterator which will return only the first associated value for any key.
public uniqueKeyIterator ( Traversable $iterator ) : Pinq\Iterators\IWrapperIterator
$iterator Traversable
return Pinq\Iterators\IWrapperIterator
    public function uniqueKeyIterator(\Traversable $iterator);

Usage Example

Beispiel #1
0
 public function indexBy(callable $function)
 {
     return $this->constructScopedSelf($this->scheme->uniqueKeyIterator($this->scheme->projectionIterator($this->elements, $function, null)));
 }