Skip to content

Commit

Permalink
Corrected two typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgimeno committed May 24, 2018
1 parent ccdb445 commit 1eb5105
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions introlenses/introlenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,13 @@ <h1>How does applicative support multi-focus lenses?</h1>
</ul>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">addr_strs ::</span> <span class="dt">Traversal&#39;</span> <span class="dt">Address</span> <span class="dt">String</span>
addr_strs elt_fn (<span class="dt">A</span> r c p)
<span class="fu">=</span> pure (\r&#39; s&#39; <span class="ot">-&gt;</span> <span class="dt">A</span> r&#39; c&#39; p) <span class="fu">&lt;*&gt;</span> (elt_fn r) <span class="fu">&lt;*&gt;</span> (elt_fn c)</code></pre></div>
<span class="fu">=</span> pure (\r&#39; c&#39; <span class="ot">-&gt;</span> <span class="dt">A</span> r&#39; c&#39; p) <span class="fu">&lt;*&gt;</span> (elt_fn r) <span class="fu">&lt;*&gt;</span> (elt_fn c)</code></pre></div>
<ul>
<li>Which is usually written as:</li>
</ul>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">addr_strs ::</span> <span class="dt">Traversal&#39;</span> <span class="dt">Address</span> <span class="dt">String</span>
addr_strs elt_fn (<span class="dt">A</span> r c p)
<span class="fu">=</span> (\r&#39; s&#39; <span class="ot">-&gt;</span> <span class="dt">A</span> r&#39; c&#39; p) <span class="fu">&lt;$&gt;</span> (elt_fn r) <span class="fu">&lt;*&gt;</span> (elt_fn c)</code></pre></div>
<span class="fu">=</span> (\r&#39; c&#39; <span class="ot">-&gt;</span> <span class="dt">A</span> r&#39; c&#39; p) <span class="fu">&lt;$&gt;</span> (elt_fn r) <span class="fu">&lt;*&gt;</span> (elt_fn c)</code></pre></div>
</div>
<div id="using-traversals" class="slide section level1">
<h1>Using Traversals</h1>
Expand Down Expand Up @@ -695,8 +695,8 @@ <h1>Unusually for a library, lenses are not abstract</h1>
<ul>
<li>...and not:</li>
</ul>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="kw">newtype</span> <span class="dt">Lens&#39;</span> s a <span class="fu">=</span> <span class="dt">L</span> (forall f<span class="fu">.</span> <span class="dt">Functor</span> f
<span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s)</code></pre></div>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="kw">newtype</span> <span class="dt">Lens&#39;</span> s a <span class="fu">=</span> <span class="dt">L</span> ( forall f<span class="fu">.</span> <span class="dt">Functor</span> f
<span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s )</code></pre></div>
<ul>
<li><p>Lenses and traversals would not compose (or would require lots of different functions to do so)</p></li>
<li><p>The inner workings are more exposed</p></li>
Expand Down
8 changes: 4 additions & 4 deletions introlenses/introlenses.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,13 @@ How does applicative support multi-focus lenses?
> addr_strs :: Traversal' Address String
> addr_strs elt_fn (A r c p)
> = pure (\r' s' -> A r' c' p) <*> (elt_fn r) <*> (elt_fn c)
> = pure (\r' c' -> A r' c' p) <*> (elt_fn r) <*> (elt_fn c)
* Which is usually written as:
> addr_strs :: Traversal' Address String
> addr_strs elt_fn (A r c p)
> = (\r' s' -> A r' c' p) <$> (elt_fn r) <*> (elt_fn c)
> = (\r' c' -> A r' c' p) <$> (elt_fn r) <*> (elt_fn c)
Using Traversals
================
Expand Down Expand Up @@ -681,8 +681,8 @@ Unusually for a library, lenses are not abstract
* ...and not:
> newtype Lens' s a = L (forall f. Functor f
> => (a -> f a) -> s -> f s)
> newtype Lens' s a = L ( forall f. Functor f
> => (a -> f a) -> s -> f s )
* Lenses and traversals would not compose (or would require lots of different functions to do so)
Expand Down

0 comments on commit 1eb5105

Please sign in to comment.