summaryrefslogtreecommitdiff
path: root/haskell/composition.html
diff options
context:
space:
mode:
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 -> c) -> (a -> b) -> (a -> c)
(.) :: (b -> c) -> ((a -> b) -> (a -> 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>