summaryrefslogtreecommitdiff
path: root/haskell/composition.html
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-09-14 14:45:50 +0200
committerTom Smeding <tom@tomsmeding.com>2021-09-14 14:45:50 +0200
commitcc3b4084bc328023b20cdf14ea6e9be1f86d940c (patch)
tree34fbf3130b6bb878a7933825a1822a19778ad685 /haskell/composition.html
parent85ffc2927b0eb5daedcd5a1c455518e985aed526 (diff)
Fix typo in haskell/composition
Diffstat (limited to 'haskell/composition.html')
-rw-r--r--haskell/composition.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/haskell/composition.html b/haskell/composition.html
index d1d4afc..1d3d013 100644
--- a/haskell/composition.html
+++ b/haskell/composition.html
@@ -123,7 +123,7 @@ This is exactly like you may have learned that subtraction is left-associative (
(.) :: (b -&gt; c) -&gt; (a -&gt; b) -&gt; (a -&gt; c)
(.) :: (b -&gt; c) -&gt; ((a -&gt; b) -&gt; (a -&gt; c))
</code></pre>
-<p><small>(Why can't we remove the parentheses around the <code>b -&gt; c</code> and <code>a -&gt; c</code> in there? That is because it the type would then suddenly mean something different. Try to work that out for yourself!)</small></p>
+<p><small>(Why can't we remove the parentheses around the <code>b -&gt; c</code> and <code>a -&gt; b</code> in there? That is because it the type would then suddenly mean something different. Try to work that out for yourself!)</small></p>
<p>We can read this as: <code>(.)</code> takes a function <code>g :: b -&gt; c</code>, a function <code>f :: a -&gt; b</code> and a value <code>x :: a</code>.
It applies <code>f</code> to <code>x</code>, applies <code>g</code> to the result, and returns the result of that.
Indeed, <code>(.)</code> can be implemented like this:</p>