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

mapWithIndex and keepWithIndex are not consistent #36

Open
prestontw opened this issue Oct 13, 2020 · 0 comments
Open

mapWithIndex and keepWithIndex are not consistent #36

prestontw opened this issue Oct 13, 2020 · 0 comments

Comments

@prestontw
Copy link

Hello! I'm starting out with reasonml. I'm confused why mapWithIndex and keepWithIndex have different parameter orders for their function parameter: mapWithIndex takes (int, 'a) => ... while keepWithIndex takes ('a, int) => ....

For comparison, Tablecloth's mapWithIndex has a consistent ordering with its filterWithIndex: f:(int -> 'a -> ...); Rust dodges this with an enumerate method for iterators which can then be filtered or mapped as necessary.

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

No branches or pull requests

1 participant