19/03/11 19:49:55.14 TMb+YRHxP
度々ごめん・・・
バグが有った。
そもそもソートとか関係なかった。
import Data.Char
main = (mapM_ print.filename) ["a","aB.txt","Ab.txt","xx","cd","cD","CD","ab.txt","f"]
filename [] = []
filename (xs:xss) | length a > 1 = a:filename b
where
a = func (==)
b = func (/=)
func f = filter (f (map toUpper xs).map toUpper) (xs:xss)
filename (_:xss) = filename xss