From 235cb9fa49bcdb7affdeb8a9c4e8a1de414d2600 Mon Sep 17 00:00:00 2001 From: Pedro Furlanetto Date: Wed, 23 May 2018 14:35:41 +1000 Subject: [PATCH] Some information need to workout the mapL and setL. --- src/Lets/Lens.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Lets/Lens.hs b/src/Lets/Lens.hs index f6ef642..1c958ee 100644 --- a/src/Lets/Lens.hs +++ b/src/Lets/Lens.hs @@ -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 --