Having these imports:
> import Control.Lens
Control.Lens> import qualified Data.Map as Map
and a map value defined as follows:
Control.Lens Map> let m = Map.fromList [('a', 1), ('c', 3), ('b', 2)]
I can get it's elements one by one like so:
Control.Lens Map> view (at 'b') m
Just 2
What I want to know is, having a set of keys such as this:
Control.Lens Map> import qualified Data.Set as Set
Control.Lens Map Set> let keys = Set.fromList ['d', 'c', 'b']
how to construct such a getter (I guess), using which I'll be able to get a set (or a list) of matching elements:
Control.Lens Map Set> view (**???**) m
[3, 2]
Notice that the result contains only 2 elements, because there's no match for a key 'd'
.