Skip to content

Commit 7bbf556

Browse files
author
Gregory Cox
committed
Delete px from img tag width and height attributes
1 parent 78130d9 commit 7bbf556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/functors-applicative-functors-and-monoids.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ <h2 id="applicative-functors">Applicative functors</h2>
420420
ghci&gt; (\x y z -&gt; [x,y,z]) &lt;$&gt; (+3) &lt;*&gt; (*2) &lt;*&gt; (/2) $ 5
421421
[8.0,10.0,2.5]
422422
</pre>
423-
<img src="assets/images/functors-applicative-functors-and-monoids/jazzb.png" class="right" width="400px" height="230px" alt="SLAP">
423+
<img src="assets/images/functors-applicative-functors-and-monoids/jazzb.png" class="right" width="400" height="230" alt="SLAP">
424424
<p>Same here. We create a function that will call the function <span class="fixed">\x y z -&gt; [x,y,z]</span> with the eventual results from <span class="fixed">(+3)</span>, <span class="fixed">(*2)</span> and <span class="fixed">(/2)</span>. The <span class="fixed">5</span> gets fed to each of the three functions and then <span class="fixed">\x y z -&gt; [x, y, z]</span> gets called with those results.</p>
425425
<p>You can think of functions as boxes that contain their eventual results, so doing <span class="fixed">k &lt;$&gt; f &lt;*&gt; g</span> creates a function that will call <span class="fixed">k</span> with the eventual results from <span class="fixed">f</span> and <span class="fixed">g</span>. When we do something like <span class="fixed">(+) &lt;$&gt; Just 3 &lt;*&gt; Just 5</span>, we’re using <span class="fixed">+</span> on values that might or might not be there, which also results in a value that might or might not be there. When we do <span class="fixed">(+) &lt;$&gt; (+10) &lt;*&gt; (+5)</span>, we’re using <span class="fixed">+</span> on the future return values of <span class="fixed">(+10)</span> and <span class="fixed">(+5)</span> and the result is also something that will produce a value only when called with a parameter.</p>
426426
<p>We don’t often use functions as applicatives, but this is still really interesting. It’s not very important that you get how the <span class="fixed">(-&gt;) r</span> instance for <span class="fixed">Applicative</span> works, so don’t despair if you’re not getting this right now. Try playing with the applicative style and functions to build up an intuition for functions as applicatives.</p>
@@ -767,7 +767,7 @@ <h3 id="using-newtype-to-make-type-class-instances">Using newtype to make type c
767767
fmap :: (a -&gt; b) -&gt; Maybe a -&gt; Maybe b
768768
</pre>
769769

770-
<img src="assets/images/functors-applicative-functors-and-monoids/krakatoa.png" class="right" width="322px" height="280px" alt="wow, very evil">
770+
<img src="assets/images/functors-applicative-functors-and-monoids/krakatoa.png" class="right" width="322" height="280" alt="wow, very evil">
771771

772772
<p>
773773
Isn’t that just peachy? Now what if we wanted to make the tuple an instance of

0 commit comments

Comments
 (0)