<div><div class="gmail_quote">On 14 April 2011 00:52,  <span dir="ltr">&lt;<a href="mailto:blackcat@pro-ns.net">blackcat@pro-ns.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Pattern matching works in ghci:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
let x = Just (Left (Blah [stuff]))<br>
let (Just (Left (Blah y)) = x<br>
</blockquote></blockquote>
<br></div>
Thanks! That&#39;s exactly what I&#39;m looking for.</blockquote><div><br></div><div>FWIW there is also Data.Either which has the either function.</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>

<br></div><div><div>λ&gt; :t either</div><div>either :: (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c</div><div><br></div><div>Quite useful sometimes.</div></div></div></div>