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 a disclaimer to HashSet.toList that order is unspecified #481

Open
andreasabel opened this issue Aug 5, 2023 · 0 comments
Open

Add a disclaimer to HashSet.toList that order is unspecified #481

andreasabel opened this issue Aug 5, 2023 · 0 comments

Comments

@andreasabel
Copy link

The warning given for HashMap.toList is missing here:

-- | \(O(n)\) Return a list of this set's elements. The list is
-- produced lazily.
toList :: HashSet a -> [a]
toList t = Exts.build (\ c z -> foldrWithKey (const . c) z (asMap t))

Note that the order of elements depends on which version of hashable this package is built against, even which minor version (which I find dubious):

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