On Sat, Mar 22, 2014 at 11:51 PM, martin <martin.drautzburg@web.de> wrote:
How can I groupBy a List whose elements are only instances of Eq but not of Ord?

If you take a look at the code for groupBy:

groupBy           :: (a -> a -> Bool) -> [a] -> [[a]]
groupBy _  []     =  []
groupBy eq (x:xs) =  (x:ys) : groupBy eq zs
                      where (ys,zs) = span (eq x) xs

and replace 'span' by 'partition' you'd get what you want.

You'd need a new name for your different groupBy of course.

-- Kim-Ee