Skip to content

Implement separate set union and set intersection monoids (and semigroups) #363

Open

Description

@MarekDudek

Currently monoid for set is union monoid, we could use both.

Activity

  1. jbgi commented on Oct 2, 2018

    @jbgi
    Member

    👍 for the intersection Semigroup.

    For the intersection Monoid<Set<A>>, the zero would need to be the set of all values for that type , which would requires instance of Enumerator<A> (we have) and Bounded<A> (we don't have yet).

    So this can be separated into two PRs if more manageable.

  2. toxyduck commented on Oct 19, 2019

    @toxyduck
    Contributor

    Hello, I would like to contribute. Can you explain, Why do I need to use Bounded<A> for intersection monoid zero, if Enumerator<A> can provide max and min elements?

  3. jbgi commented on Oct 19, 2019

    @jbgi
    Member

    max and min in Enumerator only return Option values and thus this is not very practical to instanciate the intersection Monoid. We could pass min and max explicitly though and not create Bounded for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions