DEV Community

loading...

Discussion on: Daily Challenge #148 - Disemvowel Trolls

Collapse
bamartindev profile image
Brett Martin

Standard ML of New Jersey Solution


val vowels = [#"a", #"e", #"i", #"o", #"u"]
fun member_of (item, list) = List.exists (fn x => x = item) list
fun disemvowel s = implode (List.filter (fn x => not(member_of(Char.toLower x, vowels))) (explode s))