title: Pattern-matching Seq's in Haskell
body: <p>Pattern matching is one of the most elegant Haskell features. </p>
  
  <p>I've been working on a project recently where I need a queue data structure so I'm using Data.Sequence.  However, it looks like I have to give up the elegance of pattern matching and resort to guards:</p>
  
  <pre><code>floodFillWorker :: Image -&gt; RGBAColor -&gt; Double -&gt; PixelQueue -&gt; Image
  floodFillWorker image base tolerance queue 
      | Seq.null queue = image
      | otherwise      = doSomeWork image
  </code></pre>
  
  <p>Can I use pattern matching with sequences or do I need to use guards?</p>