Skip to content

Add intersections function #41

Open
@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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions