title: haskell sorting
body: <p>How can it be done in most simply way to write (or maybe there is something embedded in haskell) function which takse as arguments list of tuples (String, Int)  and Int x and return top x tuples as list according to x value.</p>
  
  <p>I wonder if its possible to write a function which also takes 3 argument which is the name of (or index) of filed in tuple according to which sorting has to be done.</p>
  
  <p>What are best solutions to make it quite generic?</p>