Li-Fan Chen says to YSITD pwdgen :: [Char] -> [Char] pwdgen x = nub ((filter isUpper x) ++ (filter (not . isUpper) x ))