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

Missing functions #11

Open
treeowl opened this issue Feb 13, 2023 · 0 comments
Open

Missing functions #11

treeowl opened this issue Feb 13, 2023 · 0 comments

Comments

@treeowl
Copy link

treeowl commented Feb 13, 2023

It would be very nice to be able to combine member and lookup:

memberLookup :: Ord k => k -> Map ph k v -> Maybe (Key ph k, v)

Using lookup requires the value to be forced in order to perform the lookup, which can lead to space leaks under some circumstances. It would be good to have one or more of the following:

lookupA :: (Ord k, Applicative f) => Key ph k -> Map ph k v -> f v
lookupSolo :: Ord k => Key ph k -> Map ph k v -> Solo v
lookup# :: Ord k => Key ph k -> Map ph k v -> (# v #)
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