Skip to content

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

@andreasabel

Description

@andreasabel

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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions