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

[V2] index argument in methods with suffix Indexed #585

Open
dorzepowski opened this issue Jan 30, 2025 · 0 comments
Open

[V2] index argument in methods with suffix Indexed #585

dorzepowski opened this issue Jan 30, 2025 · 0 comments

Comments

@dorzepowski
Copy link

Current state:
Many methods are accepting iteratee as a function with 2 arguments func(item T, index int)

It's rather often that the index is not needed so the method that could be passed to Map, Filter, Reduce often ends up with with _ int as a second argument, just to match the function struct.

Proposition:

Rename all the current functions which accepts the index to XyzIndexed
Add functions without suffix Indexed which accepts similar function but without index argument.

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