This file is indexed.

/usr/share/doc/libghc-lens-doc/html/Control-Lens-Lens.html is in libghc-lens-doc 4.15.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Lens.Lens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Lens-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Lens-Lens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-4.15.4: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(C) 2012-16 Edward Kmett</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>Rank2Types</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Lens.Lens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Lenses</a><ul><li><a href="#g:2">Concrete Lenses</a></li></ul></li><li><a href="#g:3">Combinators</a><ul><li><a href="#g:4">General Purpose Combinators</a></li></ul></li><li><a href="#g:5">Lateral Composition</a></li><li><a href="#g:6">Setting Functionally with Passthrough</a></li><li><a href="#g:7">Setting State with Passthrough</a></li><li><a href="#g:8">Cloning Lenses</a></li><li><a href="#g:9">Arrow operators</a></li><li><a href="#g:10">ALens Combinators</a></li><li><a href="#g:11">Common Lenses</a></li><li><a href="#g:12">Context</a></li><li><a href="#g:13">Lens fusion</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A <code><code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b</code> is a purely functional reference.</p><p>While a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> could be used for
 <code><a href="Control-Lens-Getter.html#v:Getting">Getting</a></code> like a valid <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code>, it
 wasn't a valid <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> as a
 <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> can't require an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code> constraint.</p><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code>, however, is a constraint on both.</p><pre>type <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b = forall f. <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt; (a -&gt; f b) -&gt; s -&gt; f t
</pre><p>Every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> is a valid <code><a href="Control-Lens-Setter.html#v:Setter">Setter</a></code>.</p><p>Every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> can be used for <code><a href="Control-Lens-Getter.html#v:Getting">Getting</a></code> like a
 <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code> that doesn't use the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code> or
 <code>Contravariant</code>.</p><p>Every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> is a valid <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> that only uses
 the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> part of the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code> it is supplied.</p><p>Every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> can be used for <code><a href="Control-Lens-Getter.html#v:Getting">Getting</a></code> like a valid
 <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code>.</p><p>Since every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> can be used for <code><a href="Control-Lens-Getter.html#v:Getting">Getting</a></code> like a
 valid <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> it follows that it must view exactly one element in the
 structure.</p><p>The <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> laws follow from this property and the desire for it to act like
 a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#v:Traversable">Traversable</a></code> when used as a
 <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code>.</p><p>In the examples below, <code>getter</code> and <code>setter</code> are supplied as example getters
 and setters, and are not actual functions supplied by this package.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Lens">Lens</a> s t a b = <span class="keyword">forall</span> f. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; (a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><span class="keyword">type</span> <a href="#t:Lens-39-">Lens'</a> s a = <a href="Control-Lens-Lens.html#t:Lens">Lens</a> s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedLens">IndexedLens</a> i s t a b = <span class="keyword">forall</span> f p. (<a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f) =&gt; p a (f b) -&gt; s -&gt; f t</li><li class="src short"><span class="keyword">type</span> <a href="#t:IndexedLens-39-">IndexedLens'</a> i s a = <a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a> i s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:ALens">ALens</a> s t a b = <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal-Context.html#t:Pretext">Pretext</a> (-&gt;) a b) s t a b</li><li class="src short"><span class="keyword">type</span> <a href="#t:ALens-39-">ALens'</a> s a = <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a a</li><li class="src short"><span class="keyword">type</span> <a href="#t:AnIndexedLens">AnIndexedLens</a> i s t a b = <a href="Control-Lens-Type.html#t:Optical">Optical</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (-&gt;) (<a href="Control-Lens-Internal-Context.html#t:Pretext">Pretext</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) a b) s t a b</li><li class="src short"><span class="keyword">type</span> <a href="#t:AnIndexedLens-39-">AnIndexedLens'</a> i s a = <a href="Control-Lens-Lens.html#t:AnIndexedLens">AnIndexedLens</a> i s s a a</li><li class="src short"><a href="#v:lens">lens</a> :: (s -&gt; a) -&gt; (s -&gt; b -&gt; t) -&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> s t a b</li><li class="src short"><a href="#v:ilens">ilens</a> :: (s -&gt; (i, a)) -&gt; (s -&gt; b -&gt; t) -&gt; <a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a> i s t a b</li><li class="src short"><a href="#v:iplens">iplens</a> :: (s -&gt; a) -&gt; (s -&gt; b -&gt; t) -&gt; <a href="Control-Lens-Type.html#t:IndexPreservingLens">IndexPreservingLens</a> s t a b</li><li class="src short"><a href="#v:-37--37--126-">(%%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:-37--37--61-">(%%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:Over">Over</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s s a b -&gt; p a (r, b) -&gt; m r</li><li class="src short"><a href="#v:-37--37--64--126-">(%%@~)</a> :: <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:-37--37--64--61-">(%%@=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; m r</li><li class="src short"><a href="#v:-60--37--64--126-">(&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Over">Over</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)</li><li class="src short"><a href="#v:-60--37--64--61-">(&lt;%@=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b</li><li class="src short"><a href="#v:-60--60--37--64--126-">(&lt;&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Over">Over</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--60--37--64--61-">(&lt;&lt;%@=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m a</li><li class="src short"><a href="#v:-38-">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b</li><li class="src short"><a href="#v:-60--38--62-">(&lt;&amp;&gt;)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; f a -&gt; (a -&gt; b) -&gt; f b</li><li class="src short"><a href="#v:-63--63-">(??)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; f (a -&gt; b) -&gt; a -&gt; f b</li><li class="src short"><a href="#v:-38--126-">(&amp;~)</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:State">State</a> s a -&gt; s</li><li class="src short"><a href="#v:choosing">choosing</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s' t' a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> s s') (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> t t') a b</li><li class="src short"><a href="#v:chosen">chosen</a> :: <a href="Control-Lens-Type.html#t:IndexPreservingLens">IndexPreservingLens</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> b b) a b</li><li class="src short"><a href="#v:alongside">alongside</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal-Getter.html#t:AlongsideLeft">AlongsideLeft</a> f b') s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal-Getter.html#t:AlongsideRight">AlongsideRight</a> f t) s' t' a' b' -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (s, s') (t, t') (a, a') (b, b')</li><li class="src short"><a href="#v:inside">inside</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corepresentable">Corepresentable</a> p =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> (p e s) (p e t) (p e a) (p e b)</li><li class="src short"><a href="#v:-60--37--126-">(&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (b, t)</li><li class="src short"><a href="#v:-60--43--126-">(&lt;+~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--45--126-">(&lt;-~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--42--126-">(&lt;*~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--47--47--126-">(&lt;//~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--94--126-">(&lt;^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; e -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--94--94--126-">(&lt;^^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; e -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--42--42--126-">(&lt;**~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--124--124--126-">(&lt;||~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s t <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, t)</li><li class="src short"><a href="#v:-60--38--38--126-">(&lt;&amp;&amp;~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s t <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, t)</li><li class="src short"><a href="#v:-60--60--62--126-">(&lt;&lt;&gt;~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> m) s t m m -&gt; m -&gt; s -&gt; (m, t)</li><li class="src short"><a href="#v:-60--60--37--126-">(&lt;&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--60-.-126-">(&lt;&lt;.~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a b -&gt; b -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--60--63--126-">(&lt;&lt;?~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; b -&gt; s -&gt; (a, t)</li><li class="src short"><a href="#v:-60--60--43--126-">(&lt;&lt;+~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--45--126-">(&lt;&lt;-~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--42--126-">(&lt;&lt;*~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--47--47--126-">(&lt;&lt;//~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--94--126-">(&lt;&lt;^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--94--94--126-">(&lt;&lt;^^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--42--42--126-">(&lt;&lt;**~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s)</li><li class="src short"><a href="#v:-60--60--124--124--126-">(&lt;&lt;||~)</a> :: <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, s)</li><li class="src short"><a href="#v:-60--60--38--38--126-">(&lt;&lt;&amp;&amp;~)</a> :: <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, s)</li><li class="src short"><a href="#v:-60--60--60--62--126-">(&lt;&lt;&lt;&gt;~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> r =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s r -&gt; r -&gt; s -&gt; (r, s)</li><li class="src short"><a href="#v:-60--37--61-">(&lt;%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s s a b -&gt; (a -&gt; b) -&gt; m b</li><li class="src short"><a href="#v:-60--43--61-">(&lt;+=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--45--61-">(&lt;-=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--42--61-">(&lt;*=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--47--47--61-">(&lt;//=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--94--61-">(&lt;^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a</li><li class="src short"><a href="#v:-60--94--94--61-">(&lt;^^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a</li><li class="src short"><a href="#v:-60--42--42--61-">(&lt;**=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--124--124--61-">(&lt;||=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--38--38--61-">(&lt;&amp;&amp;=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--60--62--61-">(&lt;&lt;&gt;=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s r -&gt; r -&gt; m r</li><li class="src short"><a href="#v:-60--60--37--61-">(&lt;&lt;%=)</a> :: (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Strong">Strong</a> p, <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m) =&gt; <a href="Control-Lens-Type.html#t:Over">Over</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a b -&gt; p a b -&gt; m a</li><li class="src short"><a href="#v:-60--60-.-61-">(&lt;&lt;.=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a b -&gt; b -&gt; m a</li><li class="src short"><a href="#v:-60--60--63--61-">(&lt;&lt;?=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; b -&gt; m a</li><li class="src short"><a href="#v:-60--60--43--61-">(&lt;&lt;+=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--60--45--61-">(&lt;&lt;-=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--60--42--61-">(&lt;&lt;*=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--60--47--47--61-">(&lt;&lt;//=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--60--94--61-">(&lt;&lt;^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a</li><li class="src short"><a href="#v:-60--60--94--94--61-">(&lt;&lt;^^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a</li><li class="src short"><a href="#v:-60--60--42--42--61-">(&lt;&lt;**=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a</li><li class="src short"><a href="#v:-60--60--124--124--61-">(&lt;&lt;||=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--60--38--38--61-">(&lt;&lt;&amp;&amp;=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-60--60--60--62--61-">(&lt;&lt;&lt;&gt;=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s r -&gt; r -&gt; m r</li><li class="src short"><a href="#v:-60--60--126-">(&lt;&lt;~)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; m b -&gt; m b</li><li class="src short"><a href="#v:cloneLens">cloneLens</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> s t a b</li><li class="src short"><a href="#v:cloneIndexPreservingLens">cloneIndexPreservingLens</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; <a href="Control-Lens-Type.html#t:IndexPreservingLens">IndexPreservingLens</a> s t a b</li><li class="src short"><a href="#v:cloneIndexedLens">cloneIndexedLens</a> :: <a href="Control-Lens-Lens.html#t:AnIndexedLens">AnIndexedLens</a> i s t a b -&gt; <a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a> i s t a b</li><li class="src short"><a href="#v:overA">overA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Arrow.html#t:Arrow">Arrow</a> ar =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b) s t a b -&gt; ar a b -&gt; ar s t</li><li class="src short"><a href="#v:storing">storing</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; b -&gt; s -&gt; t</li><li class="src short"><a href="#v:-94--35-">(^#)</a> :: s -&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; a</li><li class="src short"><a href="#v:-35--126-">(#~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; b -&gt; s -&gt; t</li><li class="src short"><a href="#v:-35--37--126-">(#%~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t</li><li class="src short"><a href="#v:-35--37--37--126-">(#%%~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</li><li class="src short"><a href="#v:-60--35--126-">(&lt;#~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; b -&gt; s -&gt; (b, t)</li><li class="src short"><a href="#v:-60--35--37--126-">(&lt;#%~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (b, t)</li><li class="src short"><a href="#v:-35--61-">(#=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; b -&gt; m ()</li><li class="src short"><a href="#v:-35--37--61-">(#%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; (a -&gt; b) -&gt; m ()</li><li class="src short"><a href="#v:-35--37--37--61-">(#%%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; (a -&gt; (r, b)) -&gt; m r</li><li class="src short"><a href="#v:-60--35--61-">(&lt;#=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; b -&gt; m b</li><li class="src short"><a href="#v:-60--35--37--61-">(&lt;#%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; (a -&gt; b) -&gt; m b</li><li class="src short"><a href="#v:devoid">devoid</a> :: <a href="Control-Lens-Type.html#t:Over">Over</a> p f <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Void.html#t:Void">Void</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Void.html#t:Void">Void</a> a b</li><li class="src short"><a href="#v:united">united</a> :: <a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a> a ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:Context">Context</a> a b t = <a href="#v:Context">Context</a> (b -&gt; t) a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Context-39-">Context'</a> a = <a href="Control-Lens-Lens.html#t:Context">Context</a> a a</li><li class="src short"><a href="#v:locus">locus</a> :: <a href="Control-Lens-Internal-Context.html#t:IndexedComonadStore">IndexedComonadStore</a> p =&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> (p a c s) (p b c s) a b</li><li class="src short"><a href="#v:fusing">fusing</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/libghc-kan-extensions-doc/html/Data-Functor-Yoneda.html#t:Yoneda">Yoneda</a> f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b</li></ul></div><div id="interface"><h1 id="g:1">Lenses</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Lens" class="def">Lens</a> s t a b = <span class="keyword">forall</span> f. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; (a -&gt; f b) -&gt; s -&gt; f t <a href="src/Control-Lens-Type.html#Lens" class="link">Source</a> <a href="#t:Lens" class="selflink">#</a></p><div class="doc"><p>A <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> is actually a lens family as described in
 <a href="http://comonad.com/reader/2012/mirrored-lenses/">http://comonad.com/reader/2012/mirrored-lenses/</a>.</p><p>With great power comes great responsibility and a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> is subject to the
 three common sense <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> laws:</p><p>1) You get back what you put in:</p><pre><code><a href="Control-Lens-Getter.html#v:view">view</a></code> l (<code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v s)  &#8801; v
</pre><p>2) Putting back what you got doesn't change anything:</p><pre><code><a href="Control-Lens-Setter.html#v:set">set</a></code> l (<code><a href="Control-Lens-Getter.html#v:view">view</a></code> l s) s  &#8801; s
</pre><p>3) Setting twice is the same as setting once:</p><pre><code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v' (<code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v s) &#8801; <code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v' s
</pre><p>These laws are strong enough that the 4 type parameters of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> cannot
 vary fully independently. For more on how they interact, read the &quot;Why is
 it a Lens Family?&quot; section of
 <a href="http://comonad.com/reader/2012/mirrored-lenses/">http://comonad.com/reader/2012/mirrored-lenses/</a>.</p><p>There are some emergent properties of these laws:</p><p>1) <code><code><a href="Control-Lens-Setter.html#v:set">set</a></code> l s</code> must be injective for every <code>s</code> This is a consequence of law #1</p><p>2) <code><code><a href="Control-Lens-Setter.html#v:set">set</a></code> l</code> must be surjective, because of law #2, which indicates that it is possible to obtain any <code>v</code> from some <code>s</code> such that <code><code><a href="Control-Lens-Setter.html#v:set">set</a></code> s v = s</code></p><p>3) Given just the first two laws you can prove a weaker form of law #3 where the values <code>v</code> that you are setting match:</p><pre><code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v (<code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v s) &#8801; <code><a href="Control-Lens-Setter.html#v:set">set</a></code> l v s
</pre><p>Every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> can be used directly as a <code><a href="Control-Lens-Setter.html#v:Setter">Setter</a></code> or <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>.</p><p>You can also use a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> for <code><a href="Control-Lens-Getter.html#v:Getting">Getting</a></code> as if it were a
 <code><a href="Control-Lens-Type.html#t:Fold">Fold</a></code> or <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code>.</p><p>Since every <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> is a valid <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>, the
 <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> laws are required of any <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> you create:</p><pre>l <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:pure">pure</a></code> &#8801; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:pure">pure</a></code>
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code> (l f) <code>.</code> l g &#8801; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Compose.html#v:getCompose">getCompose</a></code> <code>.</code> l (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Compose.html#v:Compose">Compose</a></code> <code>.</code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code> f <code>.</code> g)
</pre><pre>type <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b = forall f. <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt; <code><a href="Control-Lens-Type.html#t:LensLike">LensLike</a></code> f s t a b
</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Lens-39-" class="def">Lens'</a> s a = <a href="Control-Lens-Lens.html#t:Lens">Lens</a> s s a a <a href="src/Control-Lens-Type.html#Lens%27" class="link">Source</a> <a href="#t:Lens-39-" class="selflink">#</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>
</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:IndexedLens" class="def">IndexedLens</a> i s t a b = <span class="keyword">forall</span> f p. (<a href="Control-Lens-Internal-Indexed.html#t:Indexable">Indexable</a> i p, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f) =&gt; p a (f b) -&gt; s -&gt; f t <a href="src/Control-Lens-Type.html#IndexedLens" class="link">Source</a> <a href="#t:IndexedLens" class="selflink">#</a></p><div class="doc"><p>Every <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> is a valid <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and a valid <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:IndexedLens-39-" class="def">IndexedLens'</a> i s a = <a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a> i s s a a <a href="src/Control-Lens-Type.html#IndexedLens%27" class="link">Source</a> <a href="#t:IndexedLens-39-" class="selflink">#</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Lens.html#t:IndexedLens-39-">IndexedLens'</a></code> i = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i)
</pre></div></div><h2 id="g:2">Concrete Lenses</h2><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:ALens" class="def">ALens</a> s t a b = <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal-Context.html#t:Pretext">Pretext</a> (-&gt;) a b) s t a b <a href="src/Control-Lens-Lens.html#ALens" class="link">Source</a> <a href="#t:ALens" class="selflink">#</a></p><div class="doc"><p>When you see this as an argument to a function, it expects a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>.</p><p>This type can also be used when you need to store a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> in a container,
 since it is rank-1. You can turn them back into a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> with <code><a href="Control-Lens-Lens.html#v:cloneLens">cloneLens</a></code>,
 or use it directly with combinators like <code><a href="Control-Lens-Lens.html#v:storing">storing</a></code> and (<code><a href="Control-Lens-Lens.html#v:-94--35-">^#</a></code>).</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:ALens-39-" class="def">ALens'</a> s a = <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a a <a href="src/Control-Lens-Lens.html#ALens%27" class="link">Source</a> <a href="#t:ALens-39-" class="selflink">#</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Lens.html#t:ALens-39-">ALens'</a></code> = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>
</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AnIndexedLens" class="def">AnIndexedLens</a> i s t a b = <a href="Control-Lens-Type.html#t:Optical">Optical</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (-&gt;) (<a href="Control-Lens-Internal-Context.html#t:Pretext">Pretext</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) a b) s t a b <a href="src/Control-Lens-Lens.html#AnIndexedLens" class="link">Source</a> <a href="#t:AnIndexedLens" class="selflink">#</a></p><div class="doc"><p>When you see this as an argument to a function, it expects an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code></p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AnIndexedLens-39-" class="def">AnIndexedLens'</a> i s a = <a href="Control-Lens-Lens.html#t:AnIndexedLens">AnIndexedLens</a> i s s a a <a href="src/Control-Lens-Lens.html#AnIndexedLens%27" class="link">Source</a> <a href="#t:AnIndexedLens-39-" class="selflink">#</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Lens.html#t:AnIndexedLens-39-">AnIndexedLens'</a></code> = <code><a href="Control-Lens-Type.html#t:Simple">Simple</a></code> (<code><a href="Control-Lens-Lens.html#t:AnIndexedLens">AnIndexedLens</a></code> i)
</pre></div></div><h1 id="g:3">Combinators</h1><div class="top"><p class="src"><a id="v:lens" class="def">lens</a> :: (s -&gt; a) -&gt; (s -&gt; b -&gt; t) -&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> s t a b <a href="src/Control-Lens-Lens.html#lens" class="link">Source</a> <a href="#v:lens" class="selflink">#</a></p><div class="doc"><p>Build a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> from a getter and a setter.</p><pre><code><a href="Control-Lens-Lens.html#v:lens">lens</a></code> :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt; (s -&gt; a) -&gt; (s -&gt; b -&gt; t) -&gt; (a -&gt; f b) -&gt; s -&gt; f t
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>s ^. lens getter setter
</code></strong>getter s
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>s &amp; lens getter setter .~ b
</code></strong>setter s b
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>s &amp; lens getter setter %~ f
</code></strong>setter s (f (getter s))
</pre><pre><code><a href="Control-Lens-Lens.html#v:lens">lens</a></code> :: (s -&gt; a) -&gt; (s -&gt; a -&gt; s) -&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a
</pre></div></div><div class="top"><p class="src"><a id="v:ilens" class="def">ilens</a> :: (s -&gt; (i, a)) -&gt; (s -&gt; b -&gt; t) -&gt; <a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a> i s t a b <a href="src/Control-Lens-Lens.html#ilens" class="link">Source</a> <a href="#v:ilens" class="selflink">#</a></p><div class="doc"><p>Build an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> from a <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> and
 a <code><a href="Control-Lens-Setter.html#v:Setter">Setter</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:iplens" class="def">iplens</a> :: (s -&gt; a) -&gt; (s -&gt; b -&gt; t) -&gt; <a href="Control-Lens-Type.html#t:IndexPreservingLens">IndexPreservingLens</a> s t a b <a href="src/Control-Lens-Lens.html#iplens" class="link">Source</a> <a href="#v:iplens" class="selflink">#</a></p><div class="doc"><p>Build an index-preserving <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> from a <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> and a
 <code><a href="Control-Lens-Setter.html#v:Setter">Setter</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:-37--37--126-" class="def">(%%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%25%25~" class="link">Source</a> <a href="#v:-37--37--126-" class="selflink">#</a></p><div class="doc"><p>(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) can be used in one of two scenarios:</p><p>When applied to a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>, it can edit the target of the <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> in a
 structure, extracting a functorial result.</p><p>When applied to a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>, it can edit the
 targets of the traversals, extracting an applicative summary of its
 actions.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[66,97,116,109,97,110] &amp; each %%~ \a -&gt; (&quot;na&quot;, chr a)
</code></strong>(&quot;nananananana&quot;,&quot;Batman&quot;)
</pre><p>For all that the definition of this combinator is just:</p><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) &#8801; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:id">id</a></code>
</pre><p>It may be beneficial to think about it as if it had these even more
 restricted types, however:</p><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt;     <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s t a b       -&gt; (a -&gt; f b) -&gt; s -&gt; f t
(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt;     <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b      -&gt; (a -&gt; f b) -&gt; s -&gt; f t
(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t
</pre><p>When applied to a <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code>, it can edit the
 targets of the traversals, extracting a supplemental monoidal summary
 of its actions, by choosing <code>f = ((,) m)</code></p><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) ::             <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s t a b       -&gt; (a -&gt; (r, b)) -&gt; s -&gt; (r, t)
(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b      -&gt; (a -&gt; (r, b)) -&gt; s -&gt; (r, t)
(<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> m =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s t a b -&gt; (a -&gt; (m, b)) -&gt; s -&gt; (m, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-37--37--61-" class="def">(%%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:Over">Over</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s s a b -&gt; p a (r, b) -&gt; m r <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%25%25%3D" class="link">Source</a> <a href="#v:-37--37--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> in the current state returning some extra
 information of type <code>r</code> or modify all targets of a
 <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> in the current state, extracting extra
 information of type <code>r</code> and return a monoidal summary of the changes.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>runState (_1 %%= \x -&gt; (f x, g x)) (a,b)
</code></strong>(f a,(g a,b))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--61-">%%=</a></code>) &#8801; (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#v:state">state</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:.">.</a></code>)
</pre><p>It may be useful to think of (<code><a href="Control-Lens-Lens.html#v:-37--37--61-">%%=</a></code>), instead, as having either of the
 following more restricted type signatures:</p><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--61-">%%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s s a b       -&gt; (a -&gt; (r, b)) -&gt; m r
(<code><a href="Control-Lens-Lens.html#v:-37--37--61-">%%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s s a b      -&gt; (a -&gt; (r, b)) -&gt; m r
(<code><a href="Control-Lens-Lens.html#v:-37--37--61-">%%=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r) =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s s a b -&gt; (a -&gt; (r, b)) -&gt; m r
</pre></div></div><div class="top"><p class="src"><a id="v:-37--37--64--126-" class="def">(%%@~)</a> :: <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i f s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%25%25%40~" class="link">Source</a> <a href="#v:-37--37--64--126-" class="selflink">#</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> returning a supplementary result, or
 adjust all of the targets of an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> and return a monoidal summary
 of the supplementary results and the answer.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--64--126-">%%@~</a></code>) &#8801; <code><a href="Control-Lens-Indexed.html#v:withIndex">withIndex</a></code>
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt; <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s t a b      -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t
(<code><a href="Control-Lens-Lens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a></code> f =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; f b) -&gt; s -&gt; f t
</pre><p>In particular, it is often useful to think of this function as having one of these even more
 restricted type signatures:</p><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--64--126-">%%@~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s t a b      -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; (r, t)
(<code><a href="Control-Lens-Lens.html#v:-37--37--64--126-">%%@~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; (r, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-37--37--64--61-" class="def">(%%@=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; m r <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%25%25%40%3D" class="link">Source</a> <a href="#v:-37--37--64--61-" class="selflink">#</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> returning a supplementary result, or
 adjust all of the targets of an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> within the current state, and
 return a monoidal summary of the supplementary results.</p><pre>l <code><a href="Control-Lens-Lens.html#v:-37--37--64--61-">%%@=</a></code> f &#8801; <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#v:state">state</a></code> (l <code><a href="Control-Lens-Lens.html#v:-37--37--64--126-">%%@~</a></code> f)
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-37--37--64--61-">%%@=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m                 =&gt; <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s s a b      -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; m r
(<code><a href="Control-Lens-Lens.html#v:-37--37--64--61-">%%@=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r) =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s s a b -&gt; (i -&gt; a -&gt; (r, b)) -&gt; s -&gt; m r
</pre></div></div><div class="top"><p class="src"><a id="v:-60--37--64--126-" class="def">(&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Over">Over</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%25%40~" class="link">Source</a> <a href="#v:-60--37--64--126-" class="selflink">#</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> returning the intermediate result, or
 adjust all of the targets of an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> and return a monoidal summary
 along with the answer.</p><pre>l <code><a href="Control-Lens-Lens.html#v:-60--37--126-">&lt;%~</a></code> f &#8801; l <code><a href="Control-Lens-Lens.html#v:-60--37--64--126-">&lt;%@~</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:const">const</a></code> f
</pre><p>When you do not need access to the index then (<code><a href="Control-Lens-Lens.html#v:-60--37--126-">&lt;%~</a></code>) is more liberal in what it can accept.</p><p>If you do not need the intermediate result, you can use (<code><a href="Control-Lens-Setter.html#v:-37--64--126-">%@~</a></code>) or even (<code><a href="Control-Lens-Setter.html#v:-37--126-">%~</a></code>).</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--37--64--126-">&lt;%@~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s t a b      -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)
(<code><a href="Control-Lens-Lens.html#v:-60--37--64--126-">&lt;%@~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> b =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (b, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--37--64--61-" class="def">(&lt;%@=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%25%40%3D" class="link">Source</a> <a href="#v:-60--37--64--61-" class="selflink">#</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> returning the intermediate result, or
 adjust all of the targets of an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> within the current state, and
 return a monoidal summary of the intermediate results.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--37--64--61-">&lt;%@=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m                 =&gt; <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s s a b      -&gt; (i -&gt; a -&gt; b) -&gt; m b
(<code><a href="Control-Lens-Lens.html#v:-60--37--64--61-">&lt;%@=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> b) =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m b
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--37--64--126-" class="def">(&lt;&lt;%@~)</a> :: <a href="Control-Lens-Type.html#t:Over">Over</a> (<a href="Control-Lens-Internal-Indexed.html#t:Indexed">Indexed</a> i) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%25%40~" class="link">Source</a> <a href="#v:-60--60--37--64--126-" class="selflink">#</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> returning the old value, or
 adjust all of the targets of an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> and return a monoidal summary
 of the old values along with the answer.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--37--64--126-">&lt;&lt;%@~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s t a b      -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60--37--64--126-">&lt;&lt;%@~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s t a b -&gt; (i -&gt; a -&gt; b) -&gt; s -&gt; (a, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--37--64--61-" class="def">(&lt;&lt;%@=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:IndexedLensLike">IndexedLensLike</a> i (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%25%40%3D" class="link">Source</a> <a href="#v:-60--60--37--64--61-" class="selflink">#</a></p><div class="doc"><p>Adjust the target of an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> returning the old value, or
 adjust all of the targets of an <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> within the current state, and
 return a monoidal summary of the old values.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--37--64--61-">&lt;&lt;%@=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m                 =&gt; <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> i s s a b      -&gt; (i -&gt; a -&gt; b) -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--37--64--61-">&lt;&lt;%@=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> b) =&gt; <code><a href="Control-Lens-Traversal.html#v:IndexedTraversal">IndexedTraversal</a></code> i s s a b -&gt; (i -&gt; a -&gt; b) -&gt; m a
</pre></div></div><h2 id="g:4">General Purpose Combinators</h2><div class="top"><p class="src"><a id="v:-38-" class="def">(&amp;)</a> :: a -&gt; (a -&gt; b) -&gt; b <span class="fixity">infixl 1</span><span class="rightedge"></span> <a href="#v:-38-" class="selflink">#</a></p><div class="doc"><p><code><a href="Control-Lens-Lens.html#v:-38-">&amp;</a></code> is a reverse application operator.  This provides notational
 convenience.  Its precedence is one higher than that of the forward
 application operator <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:-36-">$</a></code>, which allows <code><a href="Control-Lens-Lens.html#v:-38-">&amp;</a></code> to be nested in <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:-36-">$</a></code>.</p><p><em>Since: 4.8.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:-60--38--62-" class="def">(&lt;&amp;&gt;)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; f a -&gt; (a -&gt; b) -&gt; f b <span class="fixity">infixl 1</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%26%3E" class="link">Source</a> <a href="#v:-60--38--62-" class="selflink">#</a></p><div class="doc"><p>Infix flipped <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code>.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--38--62-">&lt;&amp;&gt;</a></code>) = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:flip">flip</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code>
</pre></div></div><div class="top"><p class="src"><a id="v:-63--63-" class="def">(??)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; f (a -&gt; b) -&gt; a -&gt; f b <span class="fixity">infixl 1</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3F%3F" class="link">Source</a> <a href="#v:-63--63-" class="selflink">#</a></p><div class="doc"><p>This is convenient to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:flip">flip</a></code> argument order of composite functions defined as:</p><pre>fab ?? a = fmap ($ a) fab
</pre><p>For the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> instance <code>f = ((-&gt;) r)</code> you can reason about this function as if the definition was <code>(<code><a href="Control-Lens-Lens.html#v:-63--63-">??</a></code>) &#8801; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:flip">flip</a></code></code>:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(h ?? x) a
</code></strong>h a x
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>execState ?? [] $ modify (1:)
</code></strong>[1]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over _2 ?? (&quot;hello&quot;,&quot;world&quot;) $ length
</code></strong>(&quot;hello&quot;,5)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>over ?? length ?? (&quot;hello&quot;,&quot;world&quot;) $ _2
</code></strong>(&quot;hello&quot;,5)
</pre></div></div><div class="top"><p class="src"><a id="v:-38--126-" class="def">(&amp;~)</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:State">State</a> s a -&gt; s <span class="fixity">infixl 1</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%26~" class="link">Source</a> <a href="#v:-38--126-" class="selflink">#</a></p><div class="doc"><p>This can be used to chain lens operations using <code>op=</code> syntax
 rather than <code>op~</code> syntax for simple non-type-changing cases.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(10,20) &amp; _1 .~ 30 &amp; _2 .~ 40
</code></strong>(30,40)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(10,20) &amp;~ do _1 .= 30; _2 .= 40
</code></strong>(30,40)
</pre><p>This does not support type-changing assignment, <em>e.g.</em></p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(10,20) &amp; _1 .~ &quot;hello&quot;
</code></strong>(&quot;hello&quot;,20)
</pre></div></div><h1 id="g:5">Lateral Composition</h1><div class="top"><p class="src"><a id="v:choosing" class="def">choosing</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s' t' a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> s s') (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> t t') a b <a href="src/Control-Lens-Lens.html#choosing" class="link">Source</a> <a href="#v:choosing" class="selflink">#</a></p><div class="doc"><p>Merge two lenses, getters, setters, folds or traversals.</p><pre><code><a href="Control-Lens-Lens.html#v:chosen">chosen</a></code> &#8801; <code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:id">id</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:id">id</a></code>
</pre><pre><code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> :: <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> s a     -&gt; <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> s' a     -&gt; <code><a href="Control-Lens-Getter.html#v:Getter">Getter</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> s s') a
<code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> :: <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code> s a       -&gt; <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code> s' a       -&gt; <code><a href="Control-Lens-Fold.html#v:Fold">Fold</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> s s') a
<code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a      -&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s' a      -&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> s s') a
<code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> :: <code><a href="Control-Lens-Traversal.html#v:Traversal-39-">Traversal'</a></code> s a -&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal-39-">Traversal'</a></code> s' a -&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal-39-">Traversal'</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> s s') a
<code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> :: <code><a href="Control-Lens-Setter.html#v:Setter-39-">Setter'</a></code> s a    -&gt; <code><a href="Control-Lens-Setter.html#v:Setter-39-">Setter'</a></code> s' a    -&gt; <code><a href="Control-Lens-Setter.html#v:Setter-39-">Setter'</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> s s') a
</pre></div></div><div class="top"><p class="src"><a id="v:chosen" class="def">chosen</a> :: <a href="Control-Lens-Type.html#t:IndexPreservingLens">IndexPreservingLens</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a a) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> b b) a b <a href="src/Control-Lens-Lens.html#chosen" class="link">Source</a> <a href="#v:chosen" class="selflink">#</a></p><div class="doc"><p>This is a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> that updates either side of an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code>, where both sides have the same type.</p><pre><code><a href="Control-Lens-Lens.html#v:chosen">chosen</a></code> &#8801; <code><a href="Control-Lens-Lens.html#v:choosing">choosing</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:id">id</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Function.html#v:id">id</a></code>
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Left a^.chosen
</code></strong>a
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Right a^.chosen
</code></strong>a
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Right &quot;hello&quot;^.chosen
</code></strong>&quot;hello&quot;
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Right a &amp; chosen *~ b
</code></strong>Right (a * b)
</pre><pre><code><a href="Control-Lens-Lens.html#v:chosen">chosen</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> a a) (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a></code> b b) a b
<code><a href="Control-Lens-Lens.html#v:chosen">chosen</a></code> f (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#v:Left">Left</a></code> a)  = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#v:Left">Left</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:-60--36--62-">&lt;$&gt;</a></code> f a
<code><a href="Control-Lens-Lens.html#v:chosen">chosen</a></code> f (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#v:Right">Right</a></code> a) = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#v:Right">Right</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:-60--36--62-">&lt;$&gt;</a></code> f a
</pre></div></div><div class="top"><p class="src"><a id="v:alongside" class="def">alongside</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal-Getter.html#t:AlongsideLeft">AlongsideLeft</a> f b') s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Internal-Getter.html#t:AlongsideRight">AlongsideRight</a> f t) s' t' a' b' -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f (s, s') (t, t') (a, a') (b, b') <a href="src/Control-Lens-Lens.html#alongside" class="link">Source</a> <a href="#v:alongside" class="selflink">#</a></p><div class="doc"><p><code><a href="Control-Lens-Lens.html#v:alongside">alongside</a></code> makes a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> from two other lenses or a <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> from two other getters
 by executing them on their respective halves of a product.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(Left a, Right b)^.alongside chosen chosen
</code></strong>(a,b)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(Left a, Right b) &amp; alongside chosen chosen .~ (c,d)
</code></strong>(Left c,Right d)
</pre><pre><code><a href="Control-Lens-Lens.html#v:alongside">alongside</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>   s t a b -&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>   s' t' a' b' -&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>   (s,s') (t,t') (a,a') (b,b')
<code><a href="Control-Lens-Lens.html#v:alongside">alongside</a></code> :: <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> s t a b -&gt; <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> s' t' a' b' -&gt; <code><a href="Control-Lens-Type.html#t:Getter">Getter</a></code> (s,s') (t,t') (a,a') (b,b')
</pre></div></div><div class="top"><p class="src"><a id="v:inside" class="def">inside</a> :: <a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Rep.html#t:Corepresentable">Corepresentable</a> p =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> (p e s) (p e t) (p e a) (p e b) <a href="src/Control-Lens-Lens.html#inside" class="link">Source</a> <a href="#v:inside" class="selflink">#</a></p><div class="doc"><p>Lift a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> so it can run under a function (or other corepresentable profunctor).</p><pre><code><a href="Control-Lens-Lens.html#v:inside">inside</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b -&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> (e -&gt; s) (e -&gt; t) (e -&gt; a) (e -&gt; b)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(\x -&gt; (x-1,x+1)) ^. inside _1 $ 5
</code></strong>4
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>runState (modify (1:) &gt;&gt; modify (2:)) ^. (inside _2) $ []
</code></strong>[2,1]
</pre></div></div><h1 id="g:6">Setting Functionally with Passthrough</h1><div class="top"><p class="src"><a id="v:-60--37--126-" class="def">(&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (b, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%25~" class="link">Source</a> <a href="#v:-60--37--126-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-37--126-">%~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--37--126-">&lt;%~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b      -&gt; (a -&gt; b) -&gt; s -&gt; (b, t)
(<code><a href="Control-Lens-Lens.html#v:-60--37--126-">&lt;%~</a></code>) ::             <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s t a b       -&gt; (a -&gt; b) -&gt; s -&gt; (b, t)
(<code><a href="Control-Lens-Lens.html#v:-60--37--126-">&lt;%~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> b =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (b, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--43--126-" class="def">(&lt;+~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2B~" class="link">Source</a> <a href="#v:-60--43--126-" class="selflink">#</a></p><div class="doc"><p>Increment the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the addition, (<code><a href="Control-Lens-Setter.html#v:-43--126-">+~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--43--126-">&lt;+~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--43--126-">&lt;+~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a  -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--45--126-" class="def">(&lt;-~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C-~" class="link">Source</a> <a href="#v:-60--45--126-" class="selflink">#</a></p><div class="doc"><p>Decrement the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the subtraction, (<code><a href="Control-Lens-Setter.html#v:-45--126-">-~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--45--126-">&lt;-~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--45--126-">&lt;-~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a  -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--42--126-" class="def">(&lt;*~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2A~" class="link">Source</a> <a href="#v:-60--42--126-" class="selflink">#</a></p><div class="doc"><p>Multiply the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the multiplication, (<code><a href="Control-Lens-Setter.html#v:-42--126-">*~</a></code>) is more
 flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--42--126-">&lt;*~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--42--126-">&lt;*~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code>  s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--47--47--126-" class="def">(&lt;//~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2F%2F~" class="link">Source</a> <a href="#v:-60--47--47--126-" class="selflink">#</a></p><div class="doc"><p>Divide the target of a fractionally valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the division, (<code><a href="Control-Lens-Setter.html#v:-47--47--126-">//~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--47--47--126-">&lt;//~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--47--47--126-">&lt;//~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code>  s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--94--126-" class="def">(&lt;^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; e -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%5E~" class="link">Source</a> <a href="#v:-60--94--126-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to a non-negative
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> power and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-94--126-">^~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--94--126-">&lt;^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--94--126-">&lt;^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--94--94--126-" class="def">(&lt;^^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; e -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%5E%5E~" class="link">Source</a> <a href="#v:-60--94--94--126-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a fractionally valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> power
 and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-94--94--126-">^^~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--94--94--126-">&lt;^^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--94--94--126-">&lt;^^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--42--42--126-" class="def">(&lt;**~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a a -&gt; a -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2A%2A~" class="link">Source</a> <a href="#v:-60--42--42--126-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a floating-point valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to an arbitrary power
 and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-42--42--126-">**~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--42--42--126-">&lt;**~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--42--42--126-">&lt;**~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a  -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--124--124--126-" class="def">(&lt;||~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s t <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%7C%7C~" class="link">Source</a> <a href="#v:-60--124--124--126-" class="selflink">#</a></p><div class="doc"><p>Logically <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-124--124-">||</a></code> a Boolean valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-124--124--126-">||~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--124--124--126-">&lt;||~</a></code>) :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; s -&gt; (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>, s)
(<code><a href="Control-Lens-Lens.html#v:-60--124--124--126-">&lt;||~</a></code>) :: <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>  -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; s -&gt; (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--38--38--126-" class="def">(&lt;&amp;&amp;~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s t <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%26%26~" class="link">Source</a> <a href="#v:-60--38--38--126-" class="selflink">#</a></p><div class="doc"><p>Logically <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-38--38-">&amp;&amp;</a></code> a Boolean valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-38--38--126-">&amp;&amp;~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--38--38--126-">&lt;&amp;&amp;~</a></code>) :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; s -&gt; (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>, s)
(<code><a href="Control-Lens-Lens.html#v:-60--38--38--126-">&lt;&amp;&amp;~</a></code>) :: <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>  -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; s -&gt; (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--62--126-" class="def">(&lt;&lt;&gt;~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> m) s t m m -&gt; m -&gt; s -&gt; (m, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%3E~" class="link">Source</a> <a href="#v:-60--60--62--126-" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#v:mappend">mappend</a></code> a monoidal value onto the end of the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and
 return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-60--62--126-">&lt;&gt;~</a></code>) is more flexible.</p></div></div><div class="top"><p class="src"><a id="v:-60--60--37--126-" class="def">(&lt;&lt;%~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%25~" class="link">Source</a> <a href="#v:-60--60--37--126-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>, but return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-37--126-">%~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--37--126-">&lt;&lt;%~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b      -&gt; (a -&gt; b) -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60--37--126-">&lt;&lt;%~</a></code>) ::             <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s t a b       -&gt; (a -&gt; b) -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60--37--126-">&lt;&lt;%~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (a, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60-.-126-" class="def">(&lt;&lt;.~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a b -&gt; b -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C.~" class="link">Source</a> <a href="#v:-60--60-.-126-" class="selflink">#</a></p><div class="doc"><p>Replace the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>, but return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:.-126-">.~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60-.-126-">&lt;&lt;.~</a></code>) ::             <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b      -&gt; b -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60-.-126-">&lt;&lt;.~</a></code>) ::             <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s t a b       -&gt; b -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60-.-126-">&lt;&lt;.~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s t a b -&gt; b -&gt; s -&gt; (a, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--63--126-" class="def">(&lt;&lt;?~)</a> :: <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s t a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; b -&gt; s -&gt; (a, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%3F~" class="link">Source</a> <a href="#v:-60--60--63--126-" class="selflink">#</a></p><div class="doc"><p>Replace the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> with a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Just">Just</a></code> value, but return the old value.</p><p>If you do not need the old value (<code><a href="Control-Lens-Setter.html#v:-63--126-">?~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>import Data.Map as Map
</code></strong><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_2.at &quot;hello&quot; &lt;&lt;?~ &quot;world&quot; $ (42,Map.fromList [(&quot;goodnight&quot;,&quot;gracie&quot;)])
</code></strong>(Nothing,(42,fromList [(&quot;goodnight&quot;,&quot;gracie&quot;),(&quot;hello&quot;,&quot;world&quot;)]))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--63--126-">&lt;&lt;?~</a></code>) :: <code><a href="Control-Lens-Type.html#t:Iso">Iso</a></code> s t a (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b)       -&gt; b -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60--63--126-">&lt;&lt;?~</a></code>) :: <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b)      -&gt; b -&gt; s -&gt; (a, t)
(<code><a href="Control-Lens-Lens.html#v:-60--60--63--126-">&lt;&lt;?~</a></code>) :: <code><a href="Control-Lens-Type.html#t:Traversal">Traversal</a></code> s t a (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a></code> b) -&gt; b -&gt; s -&gt; (a, t)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--43--126-" class="def">(&lt;&lt;+~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2B~" class="link">Source</a> <a href="#v:-60--60--43--126-" class="selflink">#</a></p><div class="doc"><p>Increment the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-43--126-">+~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _1 &lt;&lt;+~ c
</code></strong>(a,(a + c,b))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _2 &lt;&lt;+~ c
</code></strong>(b,(a,b + c))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--43--126-">&lt;&lt;+~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--43--126-">&lt;&lt;+~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--45--126-" class="def">(&lt;&lt;-~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C-~" class="link">Source</a> <a href="#v:-60--60--45--126-" class="selflink">#</a></p><div class="doc"><p>Decrement the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-45--126-">-~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _1 &lt;&lt;-~ c
</code></strong>(a,(a - c,b))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _2 &lt;&lt;-~ c
</code></strong>(b,(a,b - c))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--45--126-">&lt;&lt;-~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--45--126-">&lt;&lt;-~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--42--126-" class="def">(&lt;&lt;*~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2A~" class="link">Source</a> <a href="#v:-60--60--42--126-" class="selflink">#</a></p><div class="doc"><p>Multiply the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-45--126-">-~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _1 &lt;&lt;*~ c
</code></strong>(a,(a * c,b))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _2 &lt;&lt;*~ c
</code></strong>(b,(a,b * c))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--42--126-">&lt;&lt;*~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--42--126-">&lt;&lt;*~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--47--47--126-" class="def">(&lt;&lt;//~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2F%2F~" class="link">Source</a> <a href="#v:-60--60--47--47--126-" class="selflink">#</a></p><div class="doc"><p>Divide the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-47--47--126-">//~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _1 &lt;&lt;//~ c
</code></strong>(a,(a / c,b))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;Hawaii&quot;,10) &amp; _2 &lt;&lt;//~ 2
</code></strong>(10.0,(&quot;Hawaii&quot;,5.0))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--47--47--126-">&lt;&lt;//~</a></code>) :: Fractional a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--47--47--126-">&lt;&lt;//~</a></code>) :: Fractional a =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--94--126-" class="def">(&lt;&lt;^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%5E~" class="link">Source</a> <a href="#v:-60--60--94--126-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to a non-negative power and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-94--126-">^~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--94--126-">&lt;&lt;^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--94--126-">&lt;&lt;^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--94--94--126-" class="def">(&lt;&lt;^^~)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%5E%5E~" class="link">Source</a> <a href="#v:-60--60--94--94--126-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a fractionally valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to an integral power and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-94--94--126-">^^~</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--94--94--126-">&lt;&lt;^^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--94--94--126-">&lt;&lt;^^~</a></code>) :: (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; e -&gt; S -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--42--42--126-" class="def">(&lt;&lt;**~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; s -&gt; (a, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2A%2A~" class="link">Source</a> <a href="#v:-60--60--42--42--126-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a floating-point valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to an arbitrary power and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-42--42--126-">**~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _1 &lt;&lt;**~ c
</code></strong>(a,(a**c,b))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(a,b) &amp; _2 &lt;&lt;**~ c
</code></strong>(b,(a,b**c))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--42--42--126-">&lt;&lt;**~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--42--42--126-">&lt;&lt;**~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; s -&gt; (a, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--124--124--126-" class="def">(&lt;&lt;||~)</a> :: <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%7C%7C~" class="link">Source</a> <a href="#v:-60--60--124--124--126-" class="selflink">#</a></p><div class="doc"><p>Logically <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-124--124-">||</a></code> the target of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>-valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-124--124--126-">||~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(False,6) &amp; _1 &lt;&lt;||~ True
</code></strong>(False,(True,6))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,True) &amp; _2 &lt;&lt;||~ False
</code></strong>(True,(&quot;hello&quot;,True))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--124--124--126-">&lt;&lt;||~</a></code>) :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; s -&gt; (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--124--124--126-">&lt;&lt;||~</a></code>) :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; s -&gt; (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--38--38--126-" class="def">(&lt;&lt;&amp;&amp;~)</a> :: <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; s -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%26%26~" class="link">Source</a> <a href="#v:-60--60--38--38--126-" class="selflink">#</a></p><div class="doc"><p>Logically <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-38--38-">&amp;&amp;</a></code> the target of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>-valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-38--38--126-">&amp;&amp;~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(False,6) &amp; _1 &lt;&lt;&amp;&amp;~ True
</code></strong>(False,(False,6))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,True) &amp; _2 &lt;&lt;&amp;&amp;~ False
</code></strong>(True,(&quot;hello&quot;,False))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--38--38--126-">&lt;&lt;&amp;&amp;~</a></code>) :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s Bool -&gt; Bool -&gt; s -&gt; (Bool, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--38--38--126-">&lt;&lt;&amp;&amp;~</a></code>) :: <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s Bool -&gt; Bool -&gt; s -&gt; (Bool, s)
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--60--62--126-" class="def">(&lt;&lt;&lt;&gt;~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> r =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s r -&gt; r -&gt; s -&gt; (r, s) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%3C%3E~" class="link">Source</a> <a href="#v:-60--60--60--62--126-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a monoidally valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> by <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#v:mappend">mappend</a></code>ing a new value and return the old value.</p><p>When you do not need the old value, (<code><a href="Control-Lens-Setter.html#v:-60--62--126-">&lt;&gt;~</a></code>) is more flexible.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(Sum a,b) &amp; _1 &lt;&lt;&lt;&gt;~ Sum c
</code></strong>(Sum {getSum = a},(Sum {getSum = a + c},b))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>_2 &lt;&lt;&lt;&gt;~ &quot;, 007&quot; $ (&quot;James&quot;, &quot;Bond&quot;)
</code></strong>(&quot;Bond&quot;,(&quot;James&quot;,&quot;Bond, 007&quot;))
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--60--62--126-">&lt;&lt;&lt;&gt;~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s r -&gt; r -&gt; s -&gt; (r, s)
(<code><a href="Control-Lens-Lens.html#v:-60--60--60--62--126-">&lt;&lt;&lt;&gt;~</a></code>) :: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s r -&gt; r -&gt; s -&gt; (r, s)
</pre></div></div><h1 id="g:7">Setting State with Passthrough</h1><div class="top"><p class="src"><a id="v:-60--37--61-" class="def">(&lt;%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> b) s s a b -&gt; (a -&gt; b) -&gt; m b <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%25%3D" class="link">Source</a> <a href="#v:-60--37--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by a user supplied
 function and return the result.</p><p>When applied to a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code>, it this will return a monoidal summary of all of the intermediate
 results.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-37--61-">%=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--37--61-">&lt;%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a      -&gt; (a -&gt; a) -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--37--61-">&lt;%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a       -&gt; (a -&gt; a) -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--37--61-">&lt;%=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a) =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal-39-">Traversal'</a></code> s a -&gt; (a -&gt; a) -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--43--61-" class="def">(&lt;+=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2B%3D" class="link">Source</a> <a href="#v:-60--43--61-" class="selflink">#</a></p><div class="doc"><p>Add to the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state
 and return the result.</p><p>When you do not need the result of the addition, (<code><a href="Control-Lens-Setter.html#v:-43--61-">+=</a></code>) is more
 flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--43--61-">&lt;+=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--43--61-">&lt;+=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--45--61-" class="def">(&lt;-=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C-%3D" class="link">Source</a> <a href="#v:-60--45--61-" class="selflink">#</a></p><div class="doc"><p>Subtract from the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s
 state and return the result.</p><p>When you do not need the result of the subtraction, (<code><a href="Control-Lens-Setter.html#v:-45--61-">-=</a></code>) is more
 flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--45--61-">&lt;-=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--45--61-">&lt;-=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--42--61-" class="def">(&lt;*=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2A%3D" class="link">Source</a> <a href="#v:-60--42--61-" class="selflink">#</a></p><div class="doc"><p>Multiply the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s
 state and return the result.</p><p>When you do not need the result of the multiplication, (<code><a href="Control-Lens-Setter.html#v:-42--61-">*=</a></code>) is more
 flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--42--61-">&lt;*=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--42--61-">&lt;*=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--47--47--61-" class="def">(&lt;//=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2F%2F%3D" class="link">Source</a> <a href="#v:-60--47--47--61-" class="selflink">#</a></p><div class="doc"><p>Divide the target of a fractionally valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state
 and return the result.</p><p>When you do not need the result of the division, (<code><a href="Control-Lens-Setter.html#v:-47--47--61-">//=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--47--47--61-">&lt;//=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--47--47--61-">&lt;//=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--94--61-" class="def">(&lt;^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%5E%3D" class="link">Source</a> <a href="#v:-60--94--61-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a numerically valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state
 to a non-negative <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> power and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-94--61-">^=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--94--61-">&lt;^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--94--61-">&lt;^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; e -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--94--94--61-" class="def">(&lt;^^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%5E%5E%3D" class="link">Source</a> <a href="#v:-60--94--94--61-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a fractionally valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state
 to an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> power and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-94--94--61-">^^=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--94--94--61-">&lt;^^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> b, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--94--94--61-">&lt;^^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> b, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a  -&gt; e -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--42--42--61-" class="def">(&lt;**=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%2A%2A%3D" class="link">Source</a> <a href="#v:-60--42--42--61-" class="selflink">#</a></p><div class="doc"><p>Raise the target of a floating-point valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s
 state to an arbitrary power and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-42--42--61-">**=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--42--42--61-">&lt;**=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--42--42--61-">&lt;**=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a) =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--124--124--61-" class="def">(&lt;||=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%7C%7C%3D" class="link">Source</a> <a href="#v:-60--124--124--61-" class="selflink">#</a></p><div class="doc"><p>Logically <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-124--124-">||</a></code> a Boolean valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state and return
 the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-124--124--61-">||=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--124--124--61-">&lt;||=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
(<code><a href="Control-Lens-Lens.html#v:-60--124--124--61-">&lt;||=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>  -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
</pre></div></div><div class="top"><p class="src"><a id="v:-60--38--38--61-" class="def">(&lt;&amp;&amp;=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%26%26%3D" class="link">Source</a> <a href="#v:-60--38--38--61-" class="selflink">#</a></p><div class="doc"><p>Logically <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-38--38-">&amp;&amp;</a></code> a Boolean valued <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state and return
 the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-38--38--61-">&amp;&amp;=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--38--38--61-">&lt;&amp;&amp;=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
(<code><a href="Control-Lens-Lens.html#v:-60--38--38--61-">&lt;&amp;&amp;=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>  -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--62--61-" class="def">(&lt;&lt;&gt;=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s r -&gt; r -&gt; m r <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%3E%3D" class="link">Source</a> <a href="#v:-60--60--62--61-" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#v:mappend">mappend</a></code> a monoidal value onto the end of the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into
 your <code>Monad'</code>s state and return the result.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-60--62--61-">&lt;&gt;=</a></code>) is more flexible.</p></div></div><div class="top"><p class="src"><a id="v:-60--60--37--61-" class="def">(&lt;&lt;%=)</a> :: (<a href="file:///usr/share/doc/libghc-profunctors-doc/html/Data-Profunctor-Strong.html#t:Strong">Strong</a> p, <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m) =&gt; <a href="Control-Lens-Type.html#t:Over">Over</a> p (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a b -&gt; p a b -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%25%3D" class="link">Source</a> <a href="#v:-60--60--37--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by a user supplied
 function and return the <em>old</em> value that was replaced.</p><p>When applied to a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code>, this will return a monoidal summary of all of the old values
 present.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-37--61-">%=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a      -&gt; (a -&gt; a) -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a       -&gt; (a -&gt; a) -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a) =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal-39-">Traversal'</a></code> s a -&gt; (a -&gt; a) -&gt; m a
</pre><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--37--61-">&lt;&lt;%=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Type.html#t:LensLike">LensLike</a></code> ((,)a) s s a b -&gt; (a -&gt; b) -&gt; m a</pre></div></div><div class="top"><p class="src"><a id="v:-60--60-.-61-" class="def">(&lt;&lt;.=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a b -&gt; b -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C.%3D" class="link">Source</a> <a href="#v:-60--60-.-61-" class="selflink">#</a></p><div class="doc"><p>Replace the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state with a user supplied
 value and return the <em>old</em> value that was replaced.</p><p>When applied to a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code>, this will return a monoidal summary of all of the old values
 present.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:.-61-">.=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60-.-61-">&lt;&lt;.=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a      -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60-.-61-">&lt;&lt;.=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Iso.html#v:Iso-39-">Iso'</a></code> s a       -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60-.-61-">&lt;&lt;.=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a) =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal-39-">Traversal'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--63--61-" class="def">(&lt;&lt;?=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s s a (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> b) -&gt; b -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%3F%3D" class="link">Source</a> <a href="#v:-60--60--63--61-" class="selflink">#</a></p><div class="doc"><p>Replace the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state with <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Just">Just</a></code> a user supplied
 value and return the <em>old</em> value that was replaced.</p><p>When applied to a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code>, this will return a monoidal summary of all of the old values
 present.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-63--61-">?=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--63--61-">&lt;&lt;?=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a (Maybe b)      -&gt; b -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--63--61-">&lt;&lt;?=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m             =&gt; <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s t a (Maybe b)       -&gt; b -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--63--61-">&lt;&lt;?=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> a) =&gt; <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> s t a (Maybe b) -&gt; b -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--43--61-" class="def">(&lt;&lt;+=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2B%3D" class="link">Source</a> <a href="#v:-60--60--43--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by adding a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-43--61-">+=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--43--61-">&lt;&lt;+=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--43--61-">&lt;&lt;+=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--45--61-" class="def">(&lt;&lt;-=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C-%3D" class="link">Source</a> <a href="#v:-60--60--45--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by subtracting a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-45--61-">-=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--45--61-">&lt;&lt;-=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--45--61-">&lt;&lt;-=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--42--61-" class="def">(&lt;&lt;*=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2A%3D" class="link">Source</a> <a href="#v:-60--60--42--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by multipling a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-42--61-">*=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--42--61-">&lt;&lt;*=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--42--61-">&lt;&lt;*=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--47--47--61-" class="def">(&lt;&lt;//=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2F%2F%3D" class="link">Source</a> <a href="#v:-60--60--47--47--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a></code>s state by dividing by a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-47--47--61-">//=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--47--47--61-">&lt;&lt;//=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--47--47--61-">&lt;&lt;//=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--94--61-" class="def">(&lt;&lt;^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%5E%3D" class="link">Source</a> <a href="#v:-60--60--94--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by raising it by a non-negative power
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-94--61-">^=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--94--61-">&lt;&lt;^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--94--61-">&lt;&lt;^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--94--94--61-" class="def">(&lt;&lt;^^=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> e) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; e -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%5E%5E%3D" class="link">Source</a> <a href="#v:-60--60--94--94--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by raising it by an integral power
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-94--94--61-">^^=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--94--94--61-">&lt;&lt;^^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; e -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--94--94--61-">&lt;&lt;^^=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Fractional">Fractional</a></code> a, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a></code> e) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; e -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--42--42--61-" class="def">(&lt;&lt;**=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a> a) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> a) s a -&gt; a -&gt; m a <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%2A%2A%3D" class="link">Source</a> <a href="#v:-60--60--42--42--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by raising it by an arbitrary power
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-42--42--61-">**=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--42--42--61-">&lt;&lt;**=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s a -&gt; a -&gt; m a
(<code><a href="Control-Lens-Lens.html#v:-60--60--42--42--61-">&lt;&lt;**=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Numeric.html#t:Floating">Floating</a></code> a) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s a -&gt; a -&gt; m a
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--124--124--61-" class="def">(&lt;&lt;||=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%7C%7C%3D" class="link">Source</a> <a href="#v:-60--60--124--124--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by taking its logical <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-124--124-">||</a></code> with a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-124--124--61-">||=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--124--124--61-">&lt;&lt;||=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
(<code><a href="Control-Lens-Lens.html#v:-60--60--124--124--61-">&lt;&lt;||=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--38--38--61-" class="def">(&lt;&lt;&amp;&amp;=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) s <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%26%26%3D" class="link">Source</a> <a href="#v:-60--60--38--38--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by taking its logical <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:-38--38-">&amp;&amp;</a></code> with a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-38--38--61-">&amp;&amp;=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--38--38--61-">&lt;&lt;&amp;&amp;=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
(<code><a href="Control-Lens-Lens.html#v:-60--60--38--38--61-">&lt;&lt;&amp;&amp;=</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code> -&gt; m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></code>
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--60--62--61-" class="def">(&lt;&lt;&lt;&gt;=)</a> :: (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> r) =&gt; <a href="Control-Lens-Type.html#t:LensLike-39-">LensLike'</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Tuple.html#t:-40--44--41-">(,)</a> r) s r -&gt; r -&gt; m r <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C%3C%3E%3D" class="link">Source</a> <a href="#v:-60--60--60--62--61-" class="selflink">#</a></p><div class="doc"><p>Modify the target of a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> into your <code>Monad'</code>s state by <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#v:mappend">mappend</a></code>ing a value
 and return the <em>old</em> value that was replaced.</p><p>When you do not need the result of the operation, (<code><a href="Control-Lens-Setter.html#v:-60--62--61-">&lt;&gt;=</a></code>) is more flexible.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--60--62--61-">&lt;&lt;&lt;&gt;=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r) =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> s r -&gt; r -&gt; m r
(<code><a href="Control-Lens-Lens.html#v:-60--60--60--62--61-">&lt;&lt;&lt;&gt;=</a></code>) :: (<code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a></code> r) =&gt; <code><a href="Control-Lens-Type.html#t:Iso-39-">Iso'</a></code> s r -&gt; r -&gt; m r
</pre></div></div><div class="top"><p class="src"><a id="v:-60--60--126-" class="def">(&lt;&lt;~)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; m b -&gt; m b <span class="fixity">infixr 2</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%3C~" class="link">Source</a> <a href="#v:-60--60--126-" class="selflink">#</a></p><div class="doc"><p>Run a monadic action, and set the target of <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> to its result.</p><pre>(<code><a href="Control-Lens-Lens.html#v:-60--60--126-">&lt;&lt;~</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Iso.html#v:Iso">Iso</a></code> s s a b   -&gt; m b -&gt; m b
(<code><a href="Control-Lens-Lens.html#v:-60--60--126-">&lt;&lt;~</a></code>) :: <code><a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a></code> s m =&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s s a b  -&gt; m b -&gt; m b
</pre><p>NB: This is limited to taking an actual <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> than admitting a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> because
 there are potential loss of state issues otherwise.</p></div></div><h1 id="g:8">Cloning Lenses</h1><div class="top"><p class="src"><a id="v:cloneLens" class="def">cloneLens</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> s t a b <a href="src/Control-Lens-Lens.html#cloneLens" class="link">Source</a> <a href="#v:cloneLens" class="selflink">#</a></p><div class="doc"><p>Cloning a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> is one way to make sure you aren't given
 something weaker, such as a <code><a href="Control-Lens-Traversal.html#v:Traversal">Traversal</a></code> and can be
 used as a way to pass around lenses that have to be monomorphic in <code>f</code>.</p><p>Note: This only accepts a proper <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>let example l x = set (cloneLens l) (x^.cloneLens l + 1) x in example _2 (&quot;hello&quot;,1,&quot;you&quot;)
</code></strong>(&quot;hello&quot;,2,&quot;you&quot;)
</pre></div></div><div class="top"><p class="src"><a id="v:cloneIndexPreservingLens" class="def">cloneIndexPreservingLens</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; <a href="Control-Lens-Type.html#t:IndexPreservingLens">IndexPreservingLens</a> s t a b <a href="src/Control-Lens-Lens.html#cloneIndexPreservingLens" class="link">Source</a> <a href="#v:cloneIndexPreservingLens" class="selflink">#</a></p><div class="doc"><p>Clone a <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> as an <code>IndexedPreservingLens</code> that just passes through whatever
 index is on any <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code>, <code><a href="Control-Lens-Type.html#t:IndexedFold">IndexedFold</a></code>, <code><a href="Control-Lens-Type.html#t:IndexedGetter">IndexedGetter</a></code> or  <code><a href="Control-Lens-Type.html#t:IndexedTraversal">IndexedTraversal</a></code> it is composed with.</p></div></div><div class="top"><p class="src"><a id="v:cloneIndexedLens" class="def">cloneIndexedLens</a> :: <a href="Control-Lens-Lens.html#t:AnIndexedLens">AnIndexedLens</a> i s t a b -&gt; <a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a> i s t a b <a href="src/Control-Lens-Lens.html#cloneIndexedLens" class="link">Source</a> <a href="#v:cloneIndexedLens" class="selflink">#</a></p><div class="doc"><p>Clone an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> as an <code><a href="Control-Lens-Lens.html#t:IndexedLens">IndexedLens</a></code> with the same index.</p></div></div><h1 id="g:9">Arrow operators</h1><div class="top"><p class="src"><a id="v:overA" class="def">overA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Arrow.html#t:Arrow">Arrow</a> ar =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b) s t a b -&gt; ar a b -&gt; ar s t <a href="src/Control-Lens-Lens.html#overA" class="link">Source</a> <a href="#v:overA" class="selflink">#</a></p><div class="doc"><p><code><a href="Control-Lens-Setter.html#v:over">over</a></code> for Arrows.</p><p>Unlike <code><a href="Control-Lens-Setter.html#v:over">over</a></code>, <code><a href="Control-Lens-Lens.html#v:overA">overA</a></code> can't accept a simple
 <code><a href="Control-Lens-Setter.html#v:Setter">Setter</a></code>, but requires a full lens, or close
 enough.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>overA _1 ((+1) *** (+2)) ((1,2),6)
</code></strong>((2,4),6)
</pre><pre>overA :: Arrow ar =&gt; Lens s t a b -&gt; ar a b -&gt; ar s t
</pre></div></div><h1 id="g:10">ALens Combinators</h1><div class="top"><p class="src"><a id="v:storing" class="def">storing</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; b -&gt; s -&gt; t <a href="src/Control-Lens-Lens.html#storing" class="link">Source</a> <a href="#v:storing" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Control-Lens-Setter.html#v:set">set</a></code> that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>storing _2 &quot;world&quot; (&quot;hello&quot;,&quot;there&quot;)
</code></strong>(&quot;hello&quot;,&quot;world&quot;)
</pre></div></div><div class="top"><p class="src"><a id="v:-94--35-" class="def">(^#)</a> :: s -&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; a <span class="fixity">infixl 8</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%5E%23" class="link">Source</a> <a href="#v:-94--35-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;)^#_2
</code></strong>&quot;world&quot;
</pre></div></div><div class="top"><p class="src"><a id="v:-35--126-" class="def">(#~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; b -&gt; s -&gt; t <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%23~" class="link">Source</a> <a href="#v:-35--126-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Setter.html#v:.-126-">.~</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;there&quot;) &amp; _2 #~ &quot;world&quot;
</code></strong>(&quot;hello&quot;,&quot;world&quot;)
</pre></div></div><div class="top"><p class="src"><a id="v:-35--37--126-" class="def">(#%~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; t <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%23%25~" class="link">Source</a> <a href="#v:-35--37--126-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Setter.html#v:-37--126-">%~</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;) &amp; _2 #%~ length
</code></strong>(&quot;hello&quot;,5)
</pre></div></div><div class="top"><p class="src"><a id="v:-35--37--37--126-" class="def">(#%%~)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%23%25%25~" class="link">Source</a> <a href="#v:-35--37--37--126-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Lens.html#v:-37--37--126-">%%~</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;) &amp; _2 #%%~ \x -&gt; (length x, x ++ &quot;!&quot;)
</code></strong>(5,(&quot;hello&quot;,&quot;world!&quot;))
</pre></div></div><div class="top"><p class="src"><a id="v:-60--35--126-" class="def">(&lt;#~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; b -&gt; s -&gt; (b, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%23~" class="link">Source</a> <a href="#v:-60--35--126-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Setter.html#v:-60-.-126-">&lt;.~</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;there&quot;) &amp; _2 &lt;#~ &quot;world&quot;
</code></strong>(&quot;world&quot;,(&quot;hello&quot;,&quot;world&quot;))
</pre></div></div><div class="top"><p class="src"><a id="v:-60--35--37--126-" class="def">(&lt;#%~)</a> :: <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s t a b -&gt; (a -&gt; b) -&gt; s -&gt; (b, t) <span class="fixity">infixr 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%23%25~" class="link">Source</a> <a href="#v:-60--35--37--126-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Lens.html#v:-60--37--126-">&lt;%~</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(&quot;hello&quot;,&quot;world&quot;) &amp; _2 &lt;#%~ length
</code></strong>(5,(&quot;hello&quot;,5))
</pre></div></div><div class="top"><p class="src"><a id="v:-35--61-" class="def">(#=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; b -&gt; m () <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%23%3D" class="link">Source</a> <a href="#v:-35--61-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Setter.html#v:.-61-">.=</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:-35--37--61-" class="def">(#%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; (a -&gt; b) -&gt; m () <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%23%25%3D" class="link">Source</a> <a href="#v:-35--37--61-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Setter.html#v:-37--61-">%=</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:-35--37--37--61-" class="def">(#%%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; (a -&gt; (r, b)) -&gt; m r <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%23%25%25%3D" class="link">Source</a> <a href="#v:-35--37--37--61-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Lens.html#v:-37--37--61-">%%=</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:-60--35--61-" class="def">(&lt;#=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; b -&gt; m b <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%23%3D" class="link">Source</a> <a href="#v:-60--35--61-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Setter.html#v:-60-.-61-">&lt;.=</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:-60--35--37--61-" class="def">(&lt;#%=)</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Lens-Lens.html#t:ALens">ALens</a> s s a b -&gt; (a -&gt; b) -&gt; m b <span class="fixity">infix 4</span><span class="rightedge"></span> <a href="src/Control-Lens-Lens.html#%3C%23%25%3D" class="link">Source</a> <a href="#v:-60--35--37--61-" class="selflink">#</a></p><div class="doc"><p>A version of (<code><a href="Control-Lens-Lens.html#v:-60--37--61-">&lt;%=</a></code>) that works on <code><a href="Control-Lens-Lens.html#t:ALens">ALens</a></code>.</p></div></div><h1 id="g:11">Common Lenses</h1><div class="top"><p class="src"><a id="v:devoid" class="def">devoid</a> :: <a href="Control-Lens-Type.html#t:Over">Over</a> p f <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Void.html#t:Void">Void</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Void.html#t:Void">Void</a> a b <a href="src/Control-Lens-Lens.html#devoid" class="link">Source</a> <a href="#v:devoid" class="selflink">#</a></p><div class="doc"><p>There is a field for every type in the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Void.html#t:Void">Void</a></code>. Very zen.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>[] &amp; mapped.devoid +~ 1
</code></strong>[]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>Nothing &amp; mapped.devoid %~ abs
</code></strong>Nothing
</pre><pre><code><a href="Control-Lens-Lens.html#v:devoid">devoid</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Void.html#t:Void">Void</a></code> a
</pre></div></div><div class="top"><p class="src"><a id="v:united" class="def">united</a> :: <a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a> a () <a href="src/Control-Lens-Lens.html#united" class="link">Source</a> <a href="#v:united" class="selflink">#</a></p><div class="doc"><p>We can always retrieve a <code>()</code> from any type.</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot;^.united
</code></strong>()
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;hello&quot; &amp; united .~ ()
</code></strong>&quot;hello&quot;
</pre></div></div><h1 id="g:12">Context</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Context" class="def">Context</a> a b t <a href="src/Control-Lens-Internal-Context.html#Context" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></p><div class="doc"><p>The indexed store can be used to characterize a <code><a href="Control-Lens-Lens.html#v:Lens">Lens</a></code>
 and is used by <code><a href="Control-Lens-Lens.html#v:cloneLens">cloneLens</a></code>.</p><p><code><code><a href="Control-Lens-Lens.html#t:Context">Context</a></code> a b t</code> is isomorphic to
 <code>newtype <code><a href="Control-Lens-Lens.html#t:Context">Context</a></code> a b t = <code><a href="Control-Lens-Lens.html#t:Context">Context</a></code> { runContext :: forall f. <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a></code> f =&gt; (a -&gt; f b) -&gt; f t }</code>,
 and to <code>exists s. (s, <code><a href="Control-Lens-Lens.html#v:Lens">Lens</a></code> s t a b)</code>.</p><p>A <code><a href="Control-Lens-Lens.html#t:Context">Context</a></code> is like a <code><a href="Control-Lens-Lens.html#v:Lens">Lens</a></code> that has already been applied to a some structure.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Context" class="def">Context</a> (b -&gt; t) a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Context" class="caption collapser" onclick="toggleSection('i:Context')">Instances</p><div id="section.i:Context" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:IndexedComonadStore:1" class="instance expander" onclick="toggleSection('i:id:Context:IndexedComonadStore:1')"></span> <a href="Control-Lens-Internal-Context.html#t:IndexedComonadStore">IndexedComonadStore</a> <a href="Control-Lens-Lens.html#t:Context">Context</a></span> <a href="src/Control-Lens-Internal-Context.html#line-158" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:IndexedComonadStore:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ipos">ipos</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; a <a href="src/Control-Lens-Internal-Context.html#ipos" class="link">Source</a> <a href="#v:ipos" class="selflink">#</a></p><p class="src"><a href="#v:ipeek">ipeek</a> :: c -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; t <a href="src/Control-Lens-Internal-Context.html#ipeek" class="link">Source</a> <a href="#v:ipeek" class="selflink">#</a></p><p class="src"><a href="#v:ipeeks">ipeeks</a> :: (a -&gt; c) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; t <a href="src/Control-Lens-Internal-Context.html#ipeeks" class="link">Source</a> <a href="#v:ipeeks" class="selflink">#</a></p><p class="src"><a href="#v:iseek">iseek</a> :: b -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> b c t <a href="src/Control-Lens-Internal-Context.html#iseek" class="link">Source</a> <a href="#v:iseek" class="selflink">#</a></p><p class="src"><a href="#v:iseeks">iseeks</a> :: (a -&gt; b) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> b c t <a href="src/Control-Lens-Internal-Context.html#iseeks" class="link">Source</a> <a href="#v:iseeks" class="selflink">#</a></p><p class="src"><a href="#v:iexperiment">iexperiment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; (b -&gt; f c) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> b c t -&gt; f t <a href="src/Control-Lens-Internal-Context.html#iexperiment" class="link">Source</a> <a href="#v:iexperiment" class="selflink">#</a></p><p class="src"><a href="#v:context">context</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a b t -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b t <a href="src/Control-Lens-Internal-Context.html#context" class="link">Source</a> <a href="#v:context" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:IndexedComonad:2" class="instance expander" onclick="toggleSection('i:id:Context:IndexedComonad:2')"></span> <a href="Control-Lens-Internal-Context.html#t:IndexedComonad">IndexedComonad</a> <a href="Control-Lens-Lens.html#t:Context">Context</a></span> <a href="src/Control-Lens-Internal-Context.html#line-150" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:IndexedComonad:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:iextract">iextract</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a a t -&gt; t <a href="src/Control-Lens-Internal-Context.html#iextract" class="link">Source</a> <a href="#v:iextract" class="selflink">#</a></p><p class="src"><a href="#v:iduplicate">iduplicate</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b (<a href="Control-Lens-Lens.html#t:Context">Context</a> b c t) <a href="src/Control-Lens-Internal-Context.html#iduplicate" class="link">Source</a> <a href="#v:iduplicate" class="selflink">#</a></p><p class="src"><a href="#v:iextend">iextend</a> :: (<a href="Control-Lens-Lens.html#t:Context">Context</a> b c t -&gt; r) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a c t -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b r <a href="src/Control-Lens-Internal-Context.html#iextend" class="link">Source</a> <a href="#v:iextend" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:IndexedFunctor:3" class="instance expander" onclick="toggleSection('i:id:Context:IndexedFunctor:3')"></span> <a href="Control-Lens-Internal-Context.html#t:IndexedFunctor">IndexedFunctor</a> <a href="Control-Lens-Lens.html#t:Context">Context</a></span> <a href="src/Control-Lens-Internal-Context.html#line-146" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:IndexedFunctor:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ifmap">ifmap</a> :: (s -&gt; t) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b s -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b t <a href="src/Control-Lens-Internal-Context.html#ifmap" class="link">Source</a> <a href="#v:ifmap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:Sellable:4" class="instance expander" onclick="toggleSection('i:id:Context:Sellable:4')"></span> <a href="Control-Lens-Internal-Context.html#t:Sellable">Sellable</a> (-&gt;) <a href="Control-Lens-Lens.html#t:Context">Context</a></span> <a href="src/Control-Lens-Internal-Context.html#line-200" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:Sellable:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:sell">sell</a> :: a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b b <a href="src/Control-Lens-Internal-Context.html#sell" class="link">Source</a> <a href="#v:sell" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:ComonadStore:5" class="instance expander" onclick="toggleSection('i:id:Context:ComonadStore:5')"></span> (~) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> a b =&gt; <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad-Store-Class.html#t:ComonadStore">ComonadStore</a> a (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b)</span> <a href="src/Control-Lens-Internal-Context.html#line-186" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:ComonadStore:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pos">pos</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; a <a href="#v:pos" class="selflink">#</a></p><p class="src"><a href="#v:peek">peek</a> :: a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; a <a href="#v:peek" class="selflink">#</a></p><p class="src"><a href="#v:peeks">peeks</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; a <a href="#v:peeks" class="selflink">#</a></p><p class="src"><a href="#v:seek">seek</a> :: a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a <a href="#v:seek" class="selflink">#</a></p><p class="src"><a href="#v:seeks">seeks</a> :: (a -&gt; a) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a <a href="#v:seeks" class="selflink">#</a></p><p class="src"><a href="#v:experiment">experiment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; (a -&gt; f a) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; f a <a href="#v:experiment" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:Functor:6" class="instance expander" onclick="toggleSection('i:id:Context:Functor:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b)</span> <a href="src/Control-Lens-Internal-Context.html#line-174" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:Functor:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b b -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Context:Comonad:7" class="instance expander" onclick="toggleSection('i:id:Context:Comonad:7')"></span> (~) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> a b =&gt; <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad.html#t:Comonad">Comonad</a> (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b)</span> <a href="src/Control-Lens-Internal-Context.html#line-178" class="link">Source</a> <a href="#t:Context" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Context:Comonad:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:extract">extract</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; a <a href="#v:extract" class="selflink">#</a></p><p class="src"><a href="#v:duplicate">duplicate</a> :: <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b a) <a href="#v:duplicate" class="selflink">#</a></p><p class="src"><a href="#v:extend">extend</a> :: (<a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; b) -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b a -&gt; <a href="Control-Lens-Lens.html#t:Context">Context</a> a b b <a href="#v:extend" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Context-39-" class="def">Context'</a> a = <a href="Control-Lens-Lens.html#t:Context">Context</a> a a <a href="src/Control-Lens-Internal-Context.html#Context%27" class="link">Source</a> <a href="#t:Context-39-" class="selflink">#</a></p><div class="doc"><pre>type <code><a href="Control-Lens-Lens.html#t:Context-39-">Context'</a></code> a s = <code><a href="Control-Lens-Lens.html#t:Context">Context</a></code> a a s</pre></div></div><div class="top"><p class="src"><a id="v:locus" class="def">locus</a> :: <a href="Control-Lens-Internal-Context.html#t:IndexedComonadStore">IndexedComonadStore</a> p =&gt; <a href="Control-Lens-Lens.html#t:Lens">Lens</a> (p a c s) (p b c s) a b <a href="src/Control-Lens-Lens.html#locus" class="link">Source</a> <a href="#v:locus" class="selflink">#</a></p><div class="doc"><p>This <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> lets you <code>view</code> the current <code>pos</code> of any indexed
 store comonad and <code>seek</code> to a new position. This reduces the API
 for working these instances to a single <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code>.</p><pre><code><a href="Control-Lens-Internal-Context.html#v:ipos">ipos</a></code> w &#8801; w <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Control-Lens-Lens.html#v:locus">locus</a></code>
<code><a href="Control-Lens-Internal-Context.html#v:iseek">iseek</a></code> s w &#8801; w <code><a href="Control-Lens-Lens.html#v:-38-">&amp;</a></code> <code><a href="Control-Lens-Lens.html#v:locus">locus</a></code> <code><a href="Control-Lens-Setter.html#v:.-126-">.~</a></code> s
<code><a href="Control-Lens-Internal-Context.html#v:iseeks">iseeks</a></code> f w &#8801; w <code><a href="Control-Lens-Lens.html#v:-38-">&amp;</a></code> <code><a href="Control-Lens-Lens.html#v:locus">locus</a></code> <code><a href="Control-Lens-Setter.html#v:-37--126-">%~</a></code> f
</pre><pre><code><a href="Control-Lens-Lens.html#v:locus">locus</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> (<code><a href="Control-Lens-Lens.html#t:Context-39-">Context'</a></code> a s) a
<code><a href="Control-Lens-Lens.html#v:locus">locus</a></code> :: <code><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a></code> p =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> (<code><a href="Control-Lens-Internal-Context.html#t:Pretext-39-">Pretext'</a></code> p a s) a
<code><a href="Control-Lens-Lens.html#v:locus">locus</a></code> :: <code><a href="Control-Lens-Internal-Indexed.html#t:Conjoined">Conjoined</a></code> p =&gt; <code><a href="Control-Lens-Lens.html#t:Lens-39-">Lens'</a></code> (<code><a href="Control-Lens-Internal-Context.html#t:PretextT-39-">PretextT'</a></code> p g a s) a
</pre></div></div><h1 id="g:13">Lens fusion</h1><div class="top"><p class="src"><a id="v:fusing" class="def">fusing</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f =&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> (<a href="file:///usr/share/doc/libghc-kan-extensions-doc/html/Data-Functor-Yoneda.html#t:Yoneda">Yoneda</a> f) s t a b -&gt; <a href="Control-Lens-Type.html#t:LensLike">LensLike</a> f s t a b <a href="src/Control-Lens-Lens.html#fusing" class="link">Source</a> <a href="#v:fusing" class="selflink">#</a></p><div class="doc"><p>Fuse a composition of lenses using <code><a href="file:///usr/share/doc/libghc-kan-extensions-doc/html/Data-Functor-Yoneda.html#t:Yoneda">Yoneda</a></code> to provide <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code> fusion.</p><p>In general, given a pair of lenses <code>foo</code> and <code>bar</code></p><pre>fusing (foo.bar) = foo.bar
</pre><p>however, <code>foo</code> and <code>bar</code> are either going to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code> internally or they are trivial.</p><p><code><a href="Control-Lens-Lens.html#v:fusing">fusing</a></code> exploits the <code><a href="file:///usr/share/doc/libghc-kan-extensions-doc/html/Data-Functor-Yoneda.html#t:Yoneda">Yoneda</a></code> lemma to merge these separate uses into a single <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#v:fmap">fmap</a></code>.</p><p>This is particularly effective when the choice of functor <code>f</code> is unknown at compile
 time or when the <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> <code>foo.bar</code> in the above description is recursive or complex
 enough to prevent inlining.</p><pre><code><a href="Control-Lens-Lens.html#v:fusing">fusing</a></code> :: <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b -&gt; <code><a href="Control-Lens-Lens.html#t:Lens">Lens</a></code> s t a b
</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>