Skip to content

Commit 9fb682c

Browse files
committed
Math!
1 parent e978caa commit 9fb682c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

_chapters/monad.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ So the bind function `(>>=)` (and equally its flipped version `(=<<)`) gives us
7878

7979
As an example well consider computation using the `Maybe` type, which we said is useful for [partial functions](/haskell2/#maybe), that is functions which are not sensibly defined over all of their inputs. A more complex example of such a function than we have seen before is the [quadratic formula](https://en.wikipedia.org/wiki/Quadratic_formula) which, for quadratic functions of the form:
8080

81-
![quadratic](/assets/images/chapterImages/monad/quadratic.png)
81+
$$ ax^2 + bx + c = 0 $$
82+
83+
determines two roots:
84+
85+
$$ x_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a}
86+
\quad \text{and} \quad
87+
x_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a} $$
8288
8389
This may fail in two ways:
8490

_layouts/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{%- include head.html -%}
55
<script src="{{ "/assets/js/spoilers.js" | relative_url }}" defer></script>
6-
6+
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
77
<body>
88

99
{%- include header.html -%}

0 commit comments

Comments
 (0)