On Tue, Feb 12, 2019 at 4:30 AM Côme Chilliet <c...@opensides.be> wrote: > My first thought was that this must already exists under another name, > but it seems that none of array_map, array_walk or array_reduce allows to do that easily. > (That is, in a more readable way than the boolean operator string, otherwise it’s useless) > Not in core, but I and I'm sure others, have built that pattern more than once. Ref: https://github.com/phplang/generator/blob/master/src/iterable.php
-Sara