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

Add function mapWithKey #70

Open
flip111 opened this issue Dec 22, 2023 · 2 comments
Open

Add function mapWithKey #70

flip111 opened this issue Dec 22, 2023 · 2 comments

Comments

@flip111
Copy link
Contributor

flip111 commented Dec 22, 2023

Can mapWithKey be added for the times that you want to keep all items (opposed to mapMaybeWithKey)?

@natefaubion
Copy link
Contributor

See the FunctorWithIndex instance

instance functorWithIndexMap :: FunctorWithIndex k (Map k) where

@flip111
Copy link
Contributor Author

flip111 commented Dec 22, 2023

Thanks @natefaubion

Can a hint be added to documentation here?

-- | Applies a function to each key/value pair in a map, discarding entries
-- | where the function returns `Nothing`.

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

2 participants