Haskell -- sort list with impure function

Viewed 1627

How can I sort list with IO Compare function?

sortWith :: [String] -> (String -> String -> IO Ordering) -> IO [String]

Sortby expects (a->a->Ordering) and I don't know, how to deal with it. I am too lazy to implement quick sort myself.

4 Answers
Related