title: Splitting list into a list of possible tuples
body: <p>I need to split a list into a list of all possible tuples, but I'm unsure of how to do so.</p>
  
  <p>For example:</p>
  
  <pre><code>pairs ["cat","dog","mouse"]
  </code></pre>
  
  <p>should result in:</p>
  
  <p><code>[("cat","dog"), ("cat","mouse"), ("dog","cat"), ("dog","mouse"), ("mouse","cat"), ("mouse","dog")]</code></p>
  
  <p>I was able to form the first two, but am unsure of how to get the rest.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>pairs :: [a] -&gt; [(a,a)]
  pairs (x:xs) = [(m,n) | m &lt;- [x], n &lt;- xs]
  </code></pre>