<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Nice! How is that done?<br>
    </p>
    <pre class="moz-signature" cols="72">/ Emil</pre>
    <div class="moz-cite-prefix">Den 2020-09-01 kl. 13:50, skrev Trevor
      McDonell:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFcD48Va_Lh1ipbJ7iNPfBe4tgH+BEccZ-Y7fqnsS67Ch6R0sQ@mail.gmail.com">
      <h3
style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
        UI",Helvetica,Arial,sans-serif,"Apple Color
        Emoji","Segoe UI Emoji"">Embedded pattern
        matching</h3>
      <p
style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
        UI",Helvetica,Arial,sans-serif,"Apple Color
        Emoji","Segoe UI Emoji";font-size:14px">This
        release also introduces support for <em
          style="box-sizing:border-box">embedded pattern matching</em> via
        the new <code
style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation
Mono",Menlo,monospace;font-size:11.899999618530273px;padding:0.2em
0.4em;margin:0px;background-color:rgba(27,31,35,0.05);border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px">match</code> operator,
        which allows us to reuse Haskell's case syntax in embedded code:</p>
      <div class="gmail-highlight gmail-highlight-source-haskell"
style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
        UI",Helvetica,Arial,sans-serif,"Apple Color
        Emoji","Segoe UI
        Emoji";font-size:14px;overflow:visible">
        <pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.899999618530273px;margin-top:0px;margin-bottom:0px;word-wrap:normal;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-top-left-radius:6px;border-top-right-radius:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px;word-break:normal"><span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)">intersect</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">::</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)">Exp</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)">Ray</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">-></span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)">Exp</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)">Object</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">-></span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)">Exp</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193)"><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">Bool</span></span>
intersect ray <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">=</span> match <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">\</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">case</span>
  <span class="gmail-pl-ent" style="box-sizing:border-box;color:rgb(34,134,58)">Sphere_</span> c r     <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">-></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">...</span>
  <span class="gmail-pl-ent" style="box-sizing:border-box;color:rgb(34,134,58)">Triangle_</span> a b c <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">-></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">...</span></pre>
      </div>
    </blockquote>
  </body>
</html>