import Data.List (partition) main :: IO () main = do putStrLn "hello" myList :: forall a. Ord a => [String -> a] myList = [ \str -> 2 , \str -> "hello: " <> str ] -- sortByWith :: (a -> b) -> (b -> b -> Ordering) -> [a] -> [a] myFunction :: [String] -> [String] myFunction xs = map (\f -> sortByWith f compare xs) myList