Some information need to workout the mapL and setL.

This commit is contained in:
Pedro Furlanetto 2018-05-23 14:35:41 +10:00
parent 0f0c10dfb3
commit 235cb9fa49
1 changed files with 10 additions and 0 deletions

View File

@ -437,6 +437,11 @@ sndL =
-- |
--
-- To work on `Map k a`:
-- Map.lookup :: Ord k => k -> Map k a -> Maybe a
-- Map.insert :: Ord k => k -> a -> Map k a -> Map k a
-- Map.delete :: Ord k => k -> Map k a -> Map k a
--
-- >>> get (mapL 3) (Map.fromList (map (\c -> (ord c - 96, c)) ['a'..'d']))
-- Just 'c'
--
@ -463,6 +468,11 @@ mapL =
-- |
--
-- To work on `Set a`:
-- Set.insert :: Ord a => a -> Set a -> Set a
-- Set.member :: Ord a => a -> Set a -> Bool
-- Set.delete :: Ord a => a -> Set a -> Set a
--
-- >>> get (setL 3) (Set.fromList [1..5])
-- True
--