title: clojure combinatorics - do not treat input list as multiset
body: <p>For combinatorics problems, I've been using <code>clojure.math.combinatorics</code>, which is great, however I was a little surprised by the below result the first time I encountered it (despite being clearly spelled out in the docs).</p>
  
  <p>Clojure "intelligently handles duplicates" treating the input collection as a multiset:</p>
  
  <pre><code>(combo/combinations [1 1 1 2 2] 3)
  =&gt; ((1 1 1) (1 1 2) (1 2 2))
  </code></pre>
  
  <p>Again, this is well documented and intended behavior, it just surprised me coming from a python background where combinations are treated as they are actually represented in the input collection, rather than treated as a multiset.</p>
  
  <pre><code>list(itertools.combinations([1,1,1,2,2],3))
  =&gt; [(1, 1, 1), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 2, 2), (1, 1, 2), (1, 1, 2), (1, 2, 2), (1, 2, 2)]
  </code></pre>
  
  <p>I figured there was probably either a different function, or parameter that could be supplied to get the latter behavior, but it doesn't appear to be the case.</p>
  
  <p>I am just wondering if there is another canonical library that does this, or if it's a "roll your own" situation - which is where my initial research is leading me.  I don't think I'd write the functions nearly as elegant as what's in the combinatorics library so I was really hoping there were existing efficient implementations of nice, lazy behavior, but with the standard semantics shown in the python example.</p>