stoatpower / elm-exts / Exts.Set

Extensions to the core Set library.

select : (a -> comparable) -> Set comparable -> List a -> List a

Pull any items from a list where (f x) is in the given set.

uniqueItems : (a -> Maybe comparable) -> List a -> Set comparable

Dive into a List to get a set of values.

For example, pulling a Set of countries from a List of users.

toggle : comparable -> Set comparable -> Set comparable

If x is a member of the set, remove it. Otherwise, add it.