Skip to content

Commit 8e81c17

Browse files
committed
Change GETPUT from math to code
1 parent 78adf50 commit 8e81c17

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

src/content/3.9/algebras-for-monads.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ \section{Lenses}
393393
comonad? The first coherence condition:
394394
\[\varepsilon_a \circ \mathit{coalg} = \idarrow[a]\]
395395
translates to:
396-
\[\mathit{set}\ a\ (\mathit{get}\ a) = a\]
396+
397+
\src{snippet16}
397398
This is the lens law that expresses the fact that if you set a field of
398399
the structure $a$ to its previous value, nothing changes.
399400
This law is also known as GETPUT.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set a (get a) = a
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
;;
2+
set a (get a) = a
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(a, get(a))) == a;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(a)(get(a)) == a

0 commit comments

Comments
 (0)