n><span class="n">left</span><span class="p">,</span> <span class="n">g</span><span class="p">)</span> <span class="o">||</span> 
       <span class="n">isViable</span><span class="p">(</span><span class="n">right</span><span class="p">,</span> <span class="n">g</span><span class="p">);</span>

</code></pre></div></div>

<ul>
  <li><strong>Factoring out common code:</strong> Factor out common code from different cases of a chained if-else or switch.</li>
</ul>

<div class="language-c++ bad col-sm-6 highligh