<div>Hello dear Haskellers!</div><div><br></div><div>I&#39;ve been a user and big fan of Haskell for a while, but only now I&#39;m writing my first &quot;big&quot; project in Haskell (some thousands of lines of code perhaps). It&#39;s an interpreter for a programming language, the source code is music! Yes, sheet music! :D</div>

<div><br></div><div>OK, so my specific problem goes like this: I have a list of tuples</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">:t  myList</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[ (Float, Integer) ]</font></div>

<div><br></div><div>And I want to &quot;group&quot; this list into a nested list</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">groupAtoms :: [ (Float,Integer) ]  -&gt;  [ [(Float,Integer)] ]</font></div>

<div><br></div><div>Of course, I want that the concatenation of the groups yield me the original list, i.e,  (foldl (++) [] . groupAtoms == id), and the criterion that defines a group is that:</div><div>&quot;The sum of the first elements in the tuples comprising the list must be greater than or equal to 1.0&quot;. That is, given a list of tuples, the boolean predicate deciding whether this list is a PROPER group (True) or TOO SMALL (False) is:</div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">\g -&gt; sum (map fst g)  &gt;=  1.0</font></div><div><br></div><div><br></div><div>Although the criterion is very clear, I&#39;ve tried hard until now and couldn&#39;t come up with a function for producing the nested list based on this grouping criterion. I am sure that the Haskell Hierarchical Libraries have something</div>

<div>to help me, but only now I see I&#39;m still a big noob :P</div><div><br></div><div>Could someone please help me writing this function?</div><div><br></div><div><br></div><div>My best regards from Brazil,</div><div>
<br>
</div>João Paulo Pizani Flor<div><a href="mailto:joaopizani@gmail.com" target="_blank">joaopizani@gmail.com</a></div><div>Federal University of Santa Catarina</div><br>