Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow iterable instead of array for all(), race() and any() #221

Closed
clue opened this issue May 17, 2022 · 1 comment · Fixed by #225
Closed

Allow iterable instead of array for all(), race() and any() #221

clue opened this issue May 17, 2022 · 1 comment · Fixed by #225

Comments

@clue
Copy link
Member

clue commented May 17, 2022

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 👍

@clue
Copy link
Member Author

clue commented Jun 20, 2022

Closed via #225

@clue clue closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant