Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected result for Eq[OneAnd[Set, Int]] ? #1909

Closed
ronanM opened this issue Sep 12, 2017 · 2 comments
Closed

Expected result for Eq[OneAnd[Set, Int]] ? #1909

ronanM opened this issue Sep 12, 2017 · 2 comments

Comments

@ronanM
Copy link

ronanM commented Sep 12, 2017

I expected true has with Set[Int], or maybe I am wrong... ?

import cats.data.OneAnd
import cats.implicits._

OneAnd[Set, Int](1, Set(2, 3)) === OneAnd[Set, Int](3, Set(1, 2))
> false !!!

Set(1, 2, 3) === Set(3, 1, 2)
> true
@LukaJCB
Copy link
Member

LukaJCB commented Sep 12, 2017

Yeah, you can't get a valid NonEmptySet with OneAnd, sadly we don't have a solution for that yet. See #123

@ceedubs
Copy link
Contributor

ceedubs commented Mar 25, 2018

I'm going to go ahead and close this out now that we have NonEmptySet available. The behavior can still perhaps be surprising, but hopefully now people have less of a reason to try to use OneAnd with Set.

@ceedubs ceedubs closed this as completed Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants