We should support accepting an iterable instead of only an array for all(), race() and any(). The iterable pseudo type is available as of PHP 7.1, so we can take advantage of this for our Promise v3 (see also #149). It supports passing an array just like now (see also #35), but also accepts Iterators and Generators.
(The same type also applies to the some(), map() and reduce() functions. I've filed #219 to discuss removing these functions for the Promise v3).
I'm not currently working on this, but figured it makes sense to report here in order to track this feature request. In case anybody feels like picking this up, any input and PRs would be much appreciated :+1:
We should support accepting an
iterable
instead of only anarray
forall()
,race()
andany()
. Theiterable
pseudo type is available as of PHP 7.1, so we can take advantage of this for our Promise v3 (see also #149). It supports passing anarray
just like now (see also #35), but also acceptsIterator
s andGenerator
s.(The same type also applies to the
some()
,map()
andreduce()
functions. I've filed #219 to discuss removing these functions for the Promise v3).I'm not currently working on this, but figured it makes sense to report here in order to track this feature request. In case anybody feels like picking this up, any input and PRs would be much appreciated :+1: