File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,7 @@ \section{Lenses}
396396\[ \mathit {set}\ a\ (\mathit {get}\ a) = a\]
397397This is the lens law that expresses the fact that if you set a field of
398398the structure $ a$ to its previous value, nothing changes.
399+ This law is also known as GETPUT.
399400
400401The second condition:
401402\[ \mathit {fmap}\ \mathit {coalg} \circ \mathit {coalg} = \delta _a \circ \mathit {coalg}\]
@@ -421,13 +422,15 @@ \section{Lenses}
421422
422423\src {snippet14}
423424tells us that setting the value of a field twice is the same as setting
424- it once. The second law:
425+ it once. This law is also known as PUTPUT. The second law:
425426
426427\src {snippet15}
427428tells us that getting a value of a field that was set to $ s$
428- gives $ s$ back.
429+ gives $ s$ back. This law is also known as PUTGET.
429430
430- In other words, a very well behaved lens is indeed a comonad coalgebra for
431+ A lens that satisfies GETPUT and PUTGET is called a well-behaved lens.
432+ If the lens also satisfies PUTPUT, it is called a very well behaved lens.
433+ So, in other words, a very well behaved lens is indeed a comonad coalgebra for
431434the \code {Store} functor.
432435
433436\section {Challenges }
You can’t perform that action at this time.
0 commit comments