let vowels = "aeiou" .ToCharArray ( )
let IsVowel letter = Array.exists ( fun vowel -> letter = vowel) vowels
let IsConsonant letter = not ( IsVowel letter)
let WhereLetter func letter = if func letter then letter.ToString ( ) else ""
let Disemvowel ( input: string) =
let fromInput = input.Replace ( " " , "" ) .ToLower ( )
printfn "%s" input
printfn "%s" ( String.collect ( WhereLetter IsConsonant) fromInput)
printfn "%s" ( String.collect ( WhereLetter IsVowel) fromInput)
printfn ""
[ < EntryPoint> ]
let main argv =
Disemvowel "two drums and a cymbal fall off a cliff"
Disemvowel "all those who believe in psychokinesis raise my hand"
Disemvowel "did you hear about the excellent farmer who was outstanding in his field"
//System.Console.ReadLine() |> ignore
0 // return an integer exit code
bGV0IHZvd2VscyA9ICJhZWlvdSIuVG9DaGFyQXJyYXkoKQpsZXQgSXNWb3dlbCBsZXR0ZXIgPSBBcnJheS5leGlzdHMgKGZ1biB2b3dlbCAtPiBsZXR0ZXIgPSB2b3dlbCkgdm93ZWxzCmxldCBJc0NvbnNvbmFudCBsZXR0ZXIgPSBub3QgKElzVm93ZWwgbGV0dGVyKQpsZXQgV2hlcmVMZXR0ZXIgZnVuYyBsZXR0ZXIgPSBpZiBmdW5jIGxldHRlciB0aGVuIGxldHRlci5Ub1N0cmluZygpIGVsc2UgIiIKCmxldCBEaXNlbXZvd2VsIChpbnB1dDogc3RyaW5nKSA9IAogICAgbGV0IGZyb21JbnB1dCA9IGlucHV0LlJlcGxhY2UoIiAiLCIiKS5Ub0xvd2VyKCkKICAgIHByaW50Zm4gIiVzIiBpbnB1dAogICAgcHJpbnRmbiAiJXMiIChTdHJpbmcuY29sbGVjdCAoV2hlcmVMZXR0ZXIgSXNDb25zb25hbnQpIGZyb21JbnB1dCkKICAgIHByaW50Zm4gIiVzIiAoU3RyaW5nLmNvbGxlY3QgKFdoZXJlTGV0dGVyIElzVm93ZWwpIGZyb21JbnB1dCkKICAgIHByaW50Zm4gIiIKCls8RW50cnlQb2ludD5dCmxldCBtYWluIGFyZ3Yg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