nikita-volkov/typeclasses/1.3.0

NOTE: the latest version is 1.8.0

Typeclasses.Extensions.Set

Extensions to the set API, which utilise typeclasses.

fold : Monoid a -> Set a -> a

O(n). Combine the elements of set using a Monoid instance.

foldMap : Monoid b -> (a -> b) -> Set a -> b

O(n). Map each element of the set to a type which has an instance of Monoid, and combine the results.