Proposal: Add `restriction` to Data.Map and Data.IntMap

Joachim Breitner mail at joachim-breitner.de
Thu Jul 14 13:25:48 UTC 2016


Hi,

Am Donnerstag, den 14.07.2016, 00:45 -0400 schrieb David Feuer:
> Data.IntMap.restriction :: IntSet -> IntMap a -> IntMap a
> Data.Map.restriction :: Ord k => Set k -> Map k a -> Map k a
> 
> In each case, the map is filtered to contain only the keys that are
> also found in the set. This can be implemented efficiently using a
> slightly stripped-down version of Data.Map.intersection.

+1

I believe I needed that in the past.

Joachim
-- 

Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttps://www.joachim-breitner.de/
  XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160714/f8381e2e/attachment.sig>


More information about the Libraries mailing list