let GetVowels c =
match c with
| 'a' | 'e' | 'i' | 'o' | 'u' -> c.ToString ( )
| _ -> ""
let GetConsonants c =
match c with
| ' ' -> ""
| _ when GetVowels c = "" -> c.ToString ( )
| _ -> ""
let Disemvowel str =
let FindConsonants = String.collect GetConsonants
let FindVowels = String.collect GetVowels
( FindConsonants str, FindVowels str)
let PrintDisemvoweledCollections ( input: string) =
let input = input.ToLower ( )
let PrintCollection title collection =
printfn "%-10s: %s" title collection
let consonants, vowels = Disemvowel input
PrintCollection "Input" input
PrintCollection "Consonants" consonants
PrintCollection "Vowels" vowels
printfn ""
[ < EntryPoint> ]
let main argv =
PrintDisemvoweledCollections "two drums and a cymbal fall off a cliff"
PrintDisemvoweledCollections "all those who believe in psychokinesis raise my hand"
PrintDisemvoweledCollections "did you hear about the excellent farmer who was outstanding in his field"
//System.Console.ReadLine() |> ignore
0 // return an integer exit code
bGV0IEdldFZvd2VscyBjID0KICAgIG1hdGNoIGMgd2l0aAogICAgfCAnYScgfCAnZScgfCAnaScgfCAnbycgfCAndScgLT4gYy5Ub1N0cmluZygpCiAgICB8IF8gLT4gIiIKCmxldCBHZXRDb25zb25hbnRzIGMgPQogICAgbWF0Y2ggYyB3aXRoCiAgICB8ICcgJyAtPiAiIgogICAgfCBfIHdoZW4gR2V0Vm93ZWxzIGMgPSAiIiAtPiBjLlRvU3RyaW5nKCkKICAgIHwgXyAtPiAiIgoKbGV0IERpc2Vtdm93ZWwgc3RyID0gCiAgICBsZXQgRmluZENvbnNvbmFudHMgPSBTdHJpbmcuY29sbGVjdCBHZXRDb25zb25hbnRzCiAgICBsZXQgRmluZFZvd2VscyA9IFN0cmluZy5jb2xsZWN0IEdldFZvd2VscwoKICAgIChGaW5kQ29uc29uYW50cyBzdHIsIEZpbmRWb3dlbHMgc3RyKQoKbGV0IFByaW50RGlzZW12b3dlbGVkQ29sbGVjdGlvbnMgKGlucHV0OiBzdHJpbmcpID0KICAgIGxldCBpbnB1dCA9IGlucHV0LlRvTG93ZXI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