DEV Community

loading...

Discussion on: Daily Challenge #148 - Disemvowel Trolls

Collapse
aminnairi profile image
Amin

Elm

module Main exposing (main)

import Char exposing (toLower)
import List exposing (member)
import String exposing (filter)


isForbiddenInsensitive : List Char -> Char -> Bool
isForbiddenInsensitive characterList character =
    member (toLower character) characterList


removeVowels : String -> String
removeVowels =
    filter <| not << isForbiddenInsensitive [ 'a', 'e', 'i', 'o', 'u' ]

Example.