-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add flatMap to the set class in the library #1588
Conversation
d8939b6
to
d7f8c8b
Compare
@@ -114,4 +126,7 @@ sealed case class Set[T](theSet: scala.collection.immutable.Set[T]) { | |||
|
|||
def contains(a: T): Boolean = theSet.contains(a) | |||
def subsetOf(b: Set[T]): Boolean = theSet.subsetOf(b.theSet) | |||
|
|||
def exists(p: T => Boolean): Boolean = theSet.exists(p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is set.exists available to users? It does not seem like we have many properties of it known. If no, then it's a problem if it is used in spec of flatMap. If yes, we should probably add some axioms for it, like something returning an unspecified witness if a value exists and something instantiating property if it holds for all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used implicit classes to add methods to Set. Can we use extension methods now? Would extraction need to change?
One test is failing:
I'm looking into it. |
It passes locally. It is maybe a timeout issue. |
I just ignored it with Princess |
No description provided.