f <$ a ≡ mapped .~ f $ a
>>> (a,b,c,d) & _4 .~ e (a,b,c,e)
>>> (42,"world") & _1 .~ "hello" ("hello","world")
>>> (a,b) & both .~ c (c,c)
(.~) :: Setter s t a b -> b -> s -> t (.~) :: Iso s t a b -> b -> s -> t (.~) :: Lens s t a b -> b -> s -> t (.~) :: Traversal s t a b -> b -> s -> t
>>> (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)
>>> _2 .&.~ 7 $ ("hello",254) ("hello",6)
(.&.~) :: Bits a => ReifiedSetter s t a a -> a -> s -> t (.&.~) :: Bits a => ReifiedIso s t a a -> a -> s -> t (.&.~) :: Bits a => ReifiedLens s t a a -> a -> s -> t (.&.~) :: (Monoid a, Bits a) => ReifiedTraversal s t a a -> a -> s -> t
>>> _2 .|.~ 6 $ ("hello",3) ("hello",7)
(.|.~) :: Bits a => ReifiedSetter s t a a -> a -> s -> t (.|.~) :: Bits a => ReifiedIso s t a a -> a -> s -> t (.|.~) :: Bits a => ReifiedLens s t a a -> a -> s -> t (.|.~) :: (Monoid a, Bits a) => ReifiedTraversal s t a a -> a -> s -> t
>>> _2 <.&.~ 7 $ ("hello",254) (6,("hello",6))
(<.&.~) :: Bits a => ReifiedIso s t a a -> a -> s -> (a, t) (<.&.~) :: Bits a => ReifiedLens s t a a -> a -> s -> (a, t) (<.&.~) :: (Bits a, Monoid a) => ReifiedTraversal s t a a -> a -> s -> (a, t)
>>> _2 <.|.~ 6 $ ("hello",3) (7,("hello",7))
(<.|.~) :: Bits a => ReifiedIso s t a a -> a -> s -> (a, t) (<.|.~) :: Bits a => ReifiedLens s t a a -> a -> s -> (a, t) (<.|.~) :: (Bits a, Monoid a) => ReifiedTraversal s t a a -> a -> s -> (a, t)
>>> _2 <<.&.~ 7 $ ("hello", 254) (254,("hello",6))
(<<.&.~) :: Bits a => ReifiedIso s t a a -> a -> s -> (a, t) (<<.&.~) :: Bits a => ReifiedLens s t a a -> a -> s -> (a, t) (<<.&.~) :: (Bits a, Monoid a) => ReifiedTraversal s t a a -> a -> s -> (a, t)
>>> _2 <<.|.~ 6 $ ("hello", 3) (3,("hello",7))
(<<.|.~) :: Bits a => ReifiedIso s t a a -> a -> s -> (a, t) (<<.|.~) :: Bits a => ReifiedLens s t a a -> a -> s -> (a, t) (<<.|.~) :: (Bits a, Monoid a) => ReifiedTraversal s t a a -> a -> s -> (a, t)