PROPOSAL: Add `disjoint` method to `Data.IntSet`

Joachim Breitner mail at joachim-breitner.de
Tue Dec 19 15:01:54 UTC 2017


Hi,

Am Dienstag, den 19.12.2017, 13:44 +0100 schrieb Andreas Abel:
> +1 for "disjoint".


+1 

> I think "overlaps" falls below the Fairbairn threshold. 

✓

>  I always 
> wondered why there is a "notMember" function in the Set interface, 
> saving us 3 key presses.

Probably because of use like this:

   filter (`notMember` seen) todo            -- pretty

vs.

   filter (not . (`member` seen)) todo       -- too many parenthesis.

Of course 

   filter (\x -> not (x `member` seen)) todo -- is also ok

And I will refrain from pointing out that with the idea of no-white-
space-means-higher-precedence[1] would allow

   filter (not . `member`seen) todo          -- too many parenthesis.


[1] https://www.joachim-breitner.de/blog/730-Less_parentheses

>  One thing to consider: Data.Set should then also be equipped with a 
> function "disjoint", to keep interfaces in sync.

✓

Cheers,
Joachim
-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20171219/2c1ceb2a/attachment.sig>


More information about the Libraries mailing list