title: Filter a haskell list
body: <p>This is the code i have:</p>
  
  <pre><code>    data Review = Review {  artiest :: String,
                      score :: Integer,
                      tour :: Tour,
                      datum :: String,
                      plaats :: String,
                      soortLocatie :: Locatie,
                      topSongs :: [String]
                     } deriving (Eq, Ord, Show)
  
      getBestLoc [] beste = beste
      getBestLoc (x:xs) beste
          | (score x) &gt; beste = getBestLoc xs (score x)
          | otherwise = getBestLoc xs beste
  </code></pre>
  
  <p>What I'm trying to do is to get the review whit the best score, but I want the Locatie to be returned. Now I get the best score returned. How can i solve this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>So this is the new function I tried</p>
  
  <pre><code>    tester :: [Review] -&gt; Locatie
      tester = loc
          where mxscr = maximumBy (compare `on` score)
        loc = map soortLocatie mxscr
  </code></pre>