A Haskell library to classify objects by a function value, just like SQL GROUP BY