You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pre><codeclass="haskell"><spanclass="class"><spanclass="keyword">data</span><spanclass="type">Tree</span> a = <spanclass="type">Node</span> a (<spanclass="type">Maybe</span> (<spanclass="type">Tree</span><spanclass="title">a</span>)) (<spanclass="type">Maybe</span> (<spanclass="type">Tree</span><spanclass="title">a</span>))</span>
<spanclass="title">invert</span> :: <spanclass="type">Maybe</span> (<spanclass="type">Tree</span> a) -> <spanclass="type">Maybe</span> (<spanclass="type">Tree</span> a)
<spanclass="title">invert</span> (<spanclass="type">Just</span><spanclass="type">Node</span> v l r) = <spanclass="type">Just</span> (<spanclass="type">Node</span> v (invert r) (invert l))
110
-
</code></pre>
95
+
<figureclass="highlight haskell"><table><tr><tdclass="code"><pre><divclass="line"><spanclass="class"><spanclass="keyword">data</span><spanclass="type">Tree</span> a = <spanclass="type">Nil</span> | <spanclass="type">Node</span> a (<spanclass="type">Tree</span><spanclass="title">a</span>) (<spanclass="type">Tree</span><spanclass="title">a</span>)</span></div><divclass="line"><spanclass="keyword">deriving</span> (<spanclass="type">Show</span>, <spanclass="type">Eq</span>)</div><divclass="line"></div><divclass="line"><spanclass="title">invert</span> :: <spanclass="type">Tree</span> a -> <spanclass="type">Tree</span> a</div><divclass="line"><spanclass="title">invert</span><spanclass="type">Nil</span> = <spanclass="type">Nil</span></div><divclass="line"><spanclass="title">invert</span> (<spanclass="type">Node</span> v l r) = <spanclass="type">Node</span> v (invert r) (invert l)</div></pre></td></tr></table></figure>
<pre><codeclass="haskell"><spanclass="class"><spanclass="keyword">data</span><spanclass="type">Tree</span> a = <spanclass="type">Node</span> a (<spanclass="type">Maybe</span> (<spanclass="type">Tree</span><spanclass="title">a</span>)) (<spanclass="type">Maybe</span> (<spanclass="type">Tree</span><spanclass="title">a</span>))</span>
<spanclass="title">invert</span> :: <spanclass="type">Maybe</span> (<spanclass="type">Tree</span> a) -> <spanclass="type">Maybe</span> (<spanclass="type">Tree</span> a)
<spanclass="title">invert</span> (<spanclass="type">Just</span><spanclass="type">Node</span> v l r) = <spanclass="type">Just</span> (<spanclass="type">Node</span> v (invert r) (invert l))
369
-
</code></pre>
354
+
<figureclass="highlight haskell"><table><tr><tdclass="code"><pre><divclass="line"><spanclass="class"><spanclass="keyword">data</span><spanclass="type">Tree</span> a = <spanclass="type">Nil</span> | <spanclass="type">Node</span> a (<spanclass="type">Tree</span><spanclass="title">a</span>) (<spanclass="type">Tree</span><spanclass="title">a</span>)</span></div><divclass="line"><spanclass="keyword">deriving</span> (<spanclass="type">Show</span>, <spanclass="type">Eq</span>)</div><divclass="line"></div><divclass="line"><spanclass="title">invert</span> :: <spanclass="type">Tree</span> a -> <spanclass="type">Tree</span> a</div><divclass="line"><spanclass="title">invert</span><spanclass="type">Nil</span> = <spanclass="type">Nil</span></div><divclass="line"><spanclass="title">invert</span> (<spanclass="type">Node</span> v l r) = <spanclass="type">Node</span> v (invert r) (invert l)</div></pre></td></tr></table></figure>
<pre><codeclass="haskell"><spanclass="class"><spanclass="keyword">data</span><spanclass="type">Tree</span> a = <spanclass="type">Node</span> a (<spanclass="type">Maybe</span> (<spanclass="type">Tree</span><spanclass="title">a</span>)) (<spanclass="type">Maybe</span> (<spanclass="type">Tree</span><spanclass="title">a</span>))</span>
<spanclass="title">invert</span> :: <spanclass="type">Maybe</span> (<spanclass="type">Tree</span> a) -> <spanclass="type">Maybe</span> (<spanclass="type">Tree</span> a)
<spanclass="title">invert</span> (<spanclass="type">Just</span><spanclass="type">Node</span> v l r) = <spanclass="type">Just</span> (<spanclass="type">Node</span> v (invert r) (invert l))
139
-
</code></pre>
124
+
<figureclass="highlight haskell"><table><tr><tdclass="code"><pre><divclass="line"><spanclass="class"><spanclass="keyword">data</span><spanclass="type">Tree</span> a = <spanclass="type">Nil</span> | <spanclass="type">Node</span> a (<spanclass="type">Tree</span><spanclass="title">a</span>) (<spanclass="type">Tree</span><spanclass="title">a</span>)</span></div><divclass="line"><spanclass="keyword">deriving</span> (<spanclass="type">Show</span>, <spanclass="type">Eq</span>)</div><divclass="line"></div><divclass="line"><spanclass="title">invert</span> :: <spanclass="type">Tree</span> a -> <spanclass="type">Tree</span> a</div><divclass="line"><spanclass="title">invert</span><spanclass="type">Nil</span> = <spanclass="type">Nil</span></div><divclass="line"><spanclass="title">invert</span> (<spanclass="type">Node</span> v l r) = <spanclass="type">Node</span> v (invert r) (invert l)</div></pre></td></tr></table></figure>
0 commit comments