import Data.List

comb :: String -> Int -> [String]
comb xs = comb' ((group . sort) xs)
where
comb' ys n
| n == 0 = [[]]
| (null . head) ys = comb' (tail ys) n
| (length . concat . tail) ys < n = map ((head . head) ys :) (comb' ((tail . head) ys : tail ys) (n - 1))
| otherwise = map ((head . head) ys :) (comb' ((tail . head) ys : tail ys) (n - 1)) ++ comb' (tail ys) n

こんな感じで組み合わせを求めることはできると思うんだけど速度的には難ありってことなんでしょうか
そのあたりのことを知りたい