
Hi Henry,
Yes, the "ix" function traverses into particular keys of map-like
structures https://www.stackage.org/haddock/lts-13.25/lens-4.17.1/Control-Lens-At.html#...
So, (s & ix "bob" . ix 6 .~ 'c') will yield a modified Map with 'b'
changed to 'c'.
-Michael
On Mon, Jun 17, 2019 at 9:45 PM Henry Laxen
Hi Cafe,
Suppose I have:
s :: Map String (Map Int Char) s = M.fromList [("alice", M.fromList [(5,'a')]), ("bob", M.fromList [(6,'b')])]
Is there any way to modify the 'b' entry easily using lenses?
Thanks in advance. Best wishes, Henry Laxen
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.