-- | /O(n+m)/. The restriction of a map to the keys in a set.
--
-- @
-- m `restrictKeys` s = 'filterWithKey' (\k _ -> k `'IntSet.member'` s) m
-- @
--
-- @since 0.5.8
restrictKeys :: IntMap a -> Data.IntSet.IntSet -> IntMap a
restrictKeys m s = filterWithKey (\k _ -> Data.IntSet.member k s) m
restrictKeys :: IntMap a -> Data.IntSet.IntSet -> IntMap a
restrictKeys m s = filterWithKey (\k _ -> Data.IntSet.member k s) m
restrictKeys m s = filterWithKey (\k _ -> Data.IntSet.member k s) m