<div dir="ltr"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><div style="font-family: courier new,monospace;" class="gmail_quote">On Fri, Sep 10, 2010 at 1:06 AM, Nils Schweinsberg <span dir="ltr">&lt;<a href="mailto:ml@n-sch.de">ml@n-sch.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Something like this?<br>
<br>
    import Data.List<br>
<br>
    newList :: Int -&gt; [[Int]]<br>
    newList n = myNub<br>
        [ l | l &lt;- undefined -- not really sure how you want<br>
                             -- to generate these lists :)<br>
            , sum l == sum [1..n]<br>
            ]<br>
<br>
    myNub :: (Ord a) =&gt; [[a]] -&gt; [[a]]<br>
    myNub = nubBy (\a b -&gt; sort a == sort b)<br>
<br>
<br>
- Nils<br></blockquote><div>So I&#39;ve checked out this code, and it doesn&#39;t compile on ghci. My version, without the &quot;undefined&quot; portion is(which still doesn&#39;t work):<br><br>import Data.List<br><br>newList :: Int -&gt; [[Int]]<br>
newList n = myNub [ l | l &lt;- [1..n], sum l == sum [1..n] ]<br><br>myNub :: (Ord a) =&gt; [[a]] -&gt; [[a]]<br>
myNub = nubBy (\a b -&gt; sort a == sort b)<br><br>Maybe there&#39;s something in the syntax that I&#39;m not quite getting...<br><br>\/\/<br>
<br>
<br><br> <br></div></div></div>