Find words which contains all the vowels: Difference between revisions

m
m (→‎{{header|Haskell}}: filter rather than partition (simpler here))
Line 1,279:
eachVowelOnce :: String -> Bool
eachVowelOnce w =
(uncurrylet (&&)vs .= bothfilter (==`member` 5)vowels) $w
in ((,)5 .== length <*>vs && 5 == (size .(fromList fromListvs)) $
filter (`member` vowels) w
 
vowels :: Set Char
Line 1,290 ⟶ 1,289:
main =
readFile "unixdict.txt"
>>= (mapM_ putStrLn . filter p . lines)</syntaxhighlight>
 
------------------------- GENERIC ------------------------
 
both :: (a -> b) -> (a, a) -> (b, b)
both f ~(x, y) = (f x, f y)</syntaxhighlight>
{{Out}}
<pre>ambidextrous
9,659

edits