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

Documentation of order of elements in Iterable.kt #91

Closed
peter-cunderlik-kmed opened this issue Oct 11, 2023 · 2 comments · Fixed by #92
Closed

Documentation of order of elements in Iterable.kt #91

peter-cunderlik-kmed opened this issue Oct 11, 2023 · 2 comments · Fixed by #92

Comments

@peter-cunderlik-kmed
Copy link
Contributor

Question rather than an issue: the docs in Iterable.kt for e.g. getAll() mention that the order is preserved. Other methods like combine() don't mention anything about the order.

Is the order guaranteed and it's just that the docs are a bit inconsistent between methods or the order for some methods is not guaranteed?

@michaelbull
Copy link
Owner

michaelbull commented Oct 11, 2023

Thanks for the question - looking at the implementation the Ok results will appear in the List in order of iteration (so whatever order the Iterable.map would return). I think it's safe to assume that they are guaranteed to be in order.

I'd accept a PR to improve the documentation here - it's basically just the same documentation as the implementation in Elm which doesn't specify anything about order, so we could improve it here.

@peter-cunderlik-kmed
Copy link
Contributor Author

Thank you! The PR is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants