title: How to obtain a list of those value that satisfy this condition?
body: <p>Let's say I have a date type like this one:</p>
  
  <pre><code>type GroupNb = Int
  type Code = Int
  type Name = String
  type Random = Int
  
  data Group = Group GroupNb Code Name Random deriving Show
  </code></pre>
  
  <p>And I "add" some data(groups) in it.</p>
  
  <p>Now, I want to get a list of all the <code>GroupNb</code> having <code>1</code> as the <code>Code</code>, and <code>"test"</code> as a <code>Name</code>.</p>
  
  <pre><code>groupNumbers :: [Group] -&gt; [a]
  groupNumbers (Group _ a b _) = nub[List.find (a == 1 &amp;&amp; b == "test") [GroupNb]] 
  </code></pre>
  
  <p>This solution doesn't work...  How could I do something like that ?</p>