Bot releases are visible (Hide)
toArray()
from array<T>
to list<T>
.Published by nikic 10 months ago
iter\tap()
function (https://github.com/nikic/iter/pull/95).Published by nikic about 1 year ago
This release adds more precise phpdoc type annotations, using templates and specifying callable signatures (#93).
Published by nikic about 3 years ago
Published by nikic about 4 years ago
iter\slice()
method (#80). This works like explode()
but produces an iterator.iter\mapWithKeys()
method (#81). This works like iter\map()
but also passes keys as second parameter to the callable.Published by nikic over 5 years ago
This release makes iter compatible with PHP 7.4 by renaming the iter\fn
namespace to iter\func
.
iterable
types. (#52)iter\fn
namespace has been renamed to iter\func
. This is necessary for PHP 7.4 compatibility. (#79)$preserveKeys = false
in chunk() and add chunkWithKeys() function.Published by nikic almost 7 years ago
iter\enumerate()
function (#43).iter\isEmpty()
function (#46).$preserveKeys
parameter to iter\chunk()
(#42).Published by nikic over 7 years ago
$levels
argument for flatten()
.flatMap()
function.Published by nikic about 8 years ago
iter\zip()
is called without arguments.iter\flatten()
function now preserves keys.iter\recurse()
function. Example use is iter\recurse('iter\toArray', $data)
which will recursively convert an iterator to array.Published by nikic almost 9 years ago
Iterator iter\product(...$iterables)
:bool iter\isIterable(mixed $value)
:$key
parameter to the callback of reduce()
and reductions()
. (#28)<=>
to fn\operator()
. It is also supported on PHP versions that do not natively provide a <=>
operator.Published by nikic over 9 years ago
iter
functions:
mixed search(callable $predicate, iterable $iterable)
:$iterable
which satisfies $predicate
, or null
if no such element exists.Iterator reductions(callable $function, iterable $iterable, mixed $startValue = null)
:**
) to iter\fn\operator()
. Support is available also on older PHP versions which do not have an actual **
operator.Published by nikic over 10 years ago
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)
Published by nikic almost 11 years ago
First release :)