projects
/
lambda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0dbabab
)
(no commit message)
author
chris
<chris@web>
Mon, 30 Mar 2015 01:57:50 +0000
(21:57 -0400)
committer
Linux User
<ikiwiki@localhost.members.linode.com>
Mon, 30 Mar 2015 01:57:50 +0000
(21:57 -0400)
topics/_week8_reader_monad.mdwn
patch
|
blob
|
history
diff --git
a/topics/_week8_reader_monad.mdwn
b/topics/_week8_reader_monad.mdwn
index
557bd2f
..
9266ab3
100644
(file)
--- a/
topics/_week8_reader_monad.mdwn
+++ b/
topics/_week8_reader_monad.mdwn
@@
-19,8
+19,8
@@
The starting point was to allow the division function to return an int
option instead of an int. If we divide 6 by 2, we get the answer Just
3. But if we divide 6 by 0, we get the answer Nothing.
option instead of an int. If we divide 6 by 2, we get the answer Just
3. But if we divide 6 by 0, we get the answer Nothing.
-The next step was to adjust the other arithmetic functions to
know how
-
to handle receiving Nothing instead of a (boxed) integer.
This meant
+The next step was to adjust the other arithmetic functions to
teach them what to do if they received Nothing instead of a boxed integer.
+This meant
changing the type of their input from ints to int options. But we
didn't need to do this piecemeal; rather, we could "lift" the ordinary
arithmetic operations into the monad using the various tools provided
changing the type of their input from ints to int options. But we
didn't need to do this piecemeal; rather, we could "lift" the ordinary
arithmetic operations into the monad using the various tools provided