snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
152 stars 61 forks source link

Add `filterSet` to `IsSet` #178

Closed lehmacdj closed 4 years ago

lehmacdj commented 4 years ago

I provided implementations for the instances using the corresponding Set.filter or equivalent. This probably has better performance than converting to a list and back.

I also noticed that this had not been done for filterMap and did the same thing for it, providing filterMap = Map.filter, etc.