Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
<%@~ ) :: Over (Indexed i) ((,) b) s t a b -> (i -> a -> b) -> s -> (b, t)lens Control.Lens.Operators Adjust the target of an IndexedLens returning the intermediate result, or adjust all of the targets of an IndexedTraversal and return a monoidal summary along with the answer.
l <%~ f ≡ l <%@~ const f
When you do not need access to the index then (<%~) is more liberal in what it can accept. If you do not need the intermediate result, you can use (%@~) or even (%~).(<%@~) :: IndexedLens i s t a b -> (i -> a -> b) -> s -> (b, t) (<%@~) :: Monoid b => IndexedTraversal i s t a b -> (i -> a -> b) -> s -> (b, t)
(
<%~ ) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)lens Control.Lens.Operators Modify the target of a Lens and return the result. When you do not need the result of the operation, (%~) is more flexible.
(<%~) :: Lens s t a b -> (a -> b) -> s -> (b, t) (<%~) :: Iso s t a b -> (a -> b) -> s -> (b, t) (<%~) :: Monoid b => Traversal s t a b -> (a -> b) -> s -> (b, t)
(
<<%= ) :: (Strong p, MonadState s m) => Over p ((,) a) s s a b -> p a b -> m alens Control.Lens.Operators Modify the target of a Lens into your Monad's state by a user supplied function and return the old value that was replaced. When applied to a Traversal, this will return a monoidal summary of all of the old values present. When you do not need the result of the operation, (%=) is more flexible.
(<<%=) :: MonadState s m => Lens' s a -> (a -> a) -> m a (<<%=) :: MonadState s m => Iso' s a -> (a -> a) -> m a (<<%=) :: (MonadState s m, Monoid a) => Traversal' s a -> (a -> a) -> m a
(<<%=) :: MonadState s m => LensLike ((,)a) s s a b -> (a -> b) -> m a
(
<<%@= ) :: MonadState s m => Over (Indexed i) ((,) a) s s a b -> (i -> a -> b) -> m alens Control.Lens.Operators Adjust the target of an IndexedLens returning the old value, or adjust all of the targets of an IndexedTraversal within the current state, and return a monoidal summary of the old values.
(<<%@=) :: MonadState s m => IndexedLens i s s a b -> (i -> a -> b) -> m a (<<%@=) :: (MonadState s m, Monoid b) => IndexedTraversal i s s a b -> (i -> a -> b) -> m a
(
<<%@~ ) :: Over (Indexed i) ((,) a) s t a b -> (i -> a -> b) -> s -> (a, t)lens Control.Lens.Operators Adjust the target of an IndexedLens returning the old value, or adjust all of the targets of an IndexedTraversal and return a monoidal summary of the old values along with the answer.
(<<%@~) :: IndexedLens i s t a b -> (i -> a -> b) -> s -> (a, t) (<<%@~) :: Monoid a => IndexedTraversal i s t a b -> (i -> a -> b) -> s -> (a, t)
(
<<%~ ) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)lens Control.Lens.Operators Modify the target of a Lens, but return the old value. When you do not need the old value, (%~) is more flexible.
(<<%~) :: Lens s t a b -> (a -> b) -> s -> (a, t) (<<%~) :: Iso s t a b -> (a -> b) -> s -> (a, t) (<<%~) :: Monoid a => Traversal s t a b -> (a -> b) -> s -> (a, t)
(
<%~ ) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)microlens Lens.Micro This is a version of (%~) which modifies the structure and returns it along with the new value:
>>> (1, 2) & _1 <%~ negate (-1, (-1, 2))
Simpler type signatures:(<%~) :: Lens s t a b -> (a -> b) -> s -> (b, t) (<%~) :: Monoid b => Traversal s t a b -> (a -> b) -> s -> (b, t)
Since it does getting in addition to setting, you can't use it with ASetter (but you can use it with lens and traversals).(
<<%~ ) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)microlens Lens.Micro This is a version of (%~) which modifies the structure and returns it along with the old value:
>>> (1, 2) & _1 <<%~ negate (1, (-1, 2))
Simpler type signatures:(<<%~) :: Lens s t a b -> (a -> b) -> s -> (a, t) (<<%~) :: Monoid a => Traversal s t a b -> (a -> b) -> s -> (a, t)
-
optics-core Optics.Indexed.Core Compose two indexed optics and drop indices of the right one. (If you want to compose an indexed and a non-indexed optic, you can just use (%).)
>>> itoListOf (ifolded <% ifolded) ["foo", "bar"] [(0,'f'),(0,'o'),(0,'o'),(1,'b'),(1,'a'),(1,'r')]
-
optics-core Optics.Indexed.Core Compose two indexed optics. Their indices are composed as a pair.
>>> itoListOf (ifolded <%> ifolded) ["foo", "bar"] [((0,0),'f'),((0,1),'o'),((0,2),'o'),((1,0),'b'),((1,1),'a'),((1,2),'r')]