Releases: nikic/iter
Releases · nikic/iter
iter 1.2
- Added new
iter
functions:mixed search(callable $predicate, iterable $iterable)
:
Returns the first value from$iterable
which satisfies$predicate
, ornull
if no such element exists.Iterator reductions(callable $function, iterable $iterable, mixed $startValue = null)
:
Returns an iterator which contains the intermediate values produced by applying a reduction function to an iterator. Can for example be used to compute cumulative sums.
- Added support for the power operator (
**
) toiter\fn\operator()
. Support is available also on older PHP versions which do not have an actual**
operator.
iter 1.1
Added iter
functions:
Iterator mapKeys(callable $function, iterable $iterable)
Iterator reindex(callable $function, iterable $iterable)
Iterator chunk(iterable $iterable, int $size)
Iterator flip(iterable $iterable)
string join(string $separator, iterable $iterable)
Added iter\fn
functions:
function nested_index(...$indices)