darcs patch: add Data.Set.notMember and Data.Map.notMember
john at repetae.net
Thu Mar 9 17:29:29 EST 2006
On Thu, Mar 09, 2006 at 11:09:50PM +0100, Jean-Philippe Bernardy wrote:
> Maybe I missed something, but are these two worth a name?
> For reference:
> notMember k m = not $ member k m,
> in pointless style:
> notMember = (not .) . member
> Any evidence to add to the case ?
* symmetry with elem/notElem
* quite useful for cleaning up guards:
f x | not (x `Set.member` map) && foo = ...
is hard to read.
* only a single obvious interpretation of meaning so people likely to
define their own with same name conflicting with each other and it
won't hurt to provide them.
* I likes em.
John Meacham - ⑆repetae.net⑆john⑈
More information about the Libraries