Find words which contains all the vowels: Difference between revisions
Find words which contains all the vowels (view source)
Revision as of 13:27, 17 February 2021
, 3 years agoRealize in F#
m (→{{header|Phix}}: sorry) |
(Realize in F#) |
||
Line 251:
24: stupefaction
25: sulfonamide</pre>
=={{header|F_Sharp|F#}}==
<lang fsharp>
// Words which containing all the vowels once . Nigel Galloway: February 17th., 2021
let fN g=if String.length g < 11 then false else let n=Map.ofSeq (Seq.countBy id g) in let fN g=n.ContainsKey g && n.[g]=1 in fN 'a' && fN 'i' && fN 'o' && fN 'u' && fN 'e'
seq{use n=System.IO.File.OpenText("unixdict.txt") in while not n.EndOfStream do yield n.ReadLine()}|>Seq.filter fN|>Seq.iter(printfn "%s")
</lang>
{{out}}
<pre>
ambidextrous
bimolecular
cauliflower
communicable
communicate
consanguine
consultative
countervail
exclusionary
grandiloquent
importunate
incommutable
incomputable
insupportable
loudspeaking
malnourished
mensuration
oneupmanship
pandemonium
permutation
perturbation
portraiture
praseodymium
stupefaction
sulfonamide
</pre>
=={{header|Factor}}==
|