Skip to content

Add intersections function #41

@milesfrain

Description

@milesfrain

We have union, unions, and intersection, but no intersections.

I've been using this locally:

intersections :: forall f a. Foldable f => Ord a => f (Set a) -> Set a
intersections sets = case List.fromFoldable sets of
  Nil -> Set.empty
  (x : xs) -> foldl intersection x xs

PR with tests and docs on the todo list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions