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

list.index_map: change callback signature #514

Merged
merged 2 commits into from
Dec 9, 2023
Merged

Conversation

schurhammer
Copy link
Contributor

Changed list.index_map callback signature to fn(a, Int) -> b from fn(Int, a) -> b, to be consistent with list.index_fold.

@giacomocavalieri
Copy link
Member

For the sake of consistency then I think that also iterator.index should change and have its return type Iterator(#(a, Int))

@lpil
Copy link
Member

lpil commented Dec 4, 2023

Great idea! Yes please

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@lpil lpil merged commit d07f964 into gleam-lang:main Dec 9, 2023
1 check passed
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 this pull request may close these issues.

3 participants