@greenrd Yup, I definitely understand the issue, it’s just so subtle! You’re right about being careful!!!
-
-
Replying to @ryanlecompte
@ryanlecompte@greenrd another way to say this is that Set does not obey the Functor laws3 replies 0 retweets 0 likes -
Replying to @jedws
@jedws@ryanlecompte@greenrd It doesn't? Do you have a counter example (assuming standard == based equality)?2 replies 0 retweets 0 likes -
Replying to @tixxit1 reply 0 retweets 0 likes
-
Replying to @larsr_h
@larsr_h@jedws@ryanlecompte@greenrd In that example, x == y, but f(x) != f(y). So, f isn't a function.4 replies 0 retweets 0 likes -
Replying to @tixxit
@tixxit I think@S11001001 and@puffnfresh might have an opinion here.1 reply 0 retweets 0 likes -
Replying to @larsr_h
@larsr_h@S11001001 well@tixxit is very convincing. Scala's Set means you have to be careful with equality - so Functor when that is done.1 reply 0 retweets 0 likes -
Replying to @puffnfresh
@puffnfresh@S11001001@tixxit But what does "being careful" mean?3 replies 0 retweets 0 likes -
Replying to @larsr_h
@larsr_h@S11001001@tixxit defining an equality that obeys Eq laws and also works for your structure? Your example fails the "works" part.1 reply 0 retweets 0 likes -
Replying to @puffnfresh
@puffnfresh depends on the criteria of "works" doesn't? Equality doesn't have to be structural. /cc@larsr_h@S11001001@tixxit1 reply 0 retweets 0 likes
@purefn @puffnfresh @larsr_h @S11001001 Equiv relation doesn't need to be. But Set uses == as our category's equality, so it needs to work.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.