Set with pass-through.
This is mostly present for consistency, but may be useful for chaining
assignments.
If you do not need a copy of the intermediate result, then using
l
.~ t directly is a good idea.
>>> (a,b) & _1 <.~ c
(c,(c,b))
>>> ("good","morning","vietnam") & _3 <.~ "world"
("world",("good","morning","world"))
>>> (42,Map.fromList [("goodnight","gracie")]) & _2.at "hello" <.~ Just "world"
(Just "world",(42,fromList [("goodnight","gracie"),("hello","world")]))
(<.~) :: Setter s t a b -> b -> s -> (b, t)
(<.~) :: Iso s t a b -> b -> s -> (b, t)
(<.~) :: Lens s t a b -> b -> s -> (b, t)
(<.~) :: Traversal s t a b -> b -> s -> (b, t)