iOS Closures in Swift First Class Functions Higher Order Functions

Grey Grissom
Grey Grissom
4,099 Points

the answer is right. but wont accept

// Enter your code below

// Enter your code below extension String {

func transform(_ inputF: (String) -> String) -> String {

             return inputF(self)  }

func removeVowels(from string: String) -> String { var newString = "" for character in string.characters { if ["a","e","i","o","u"].contains(character) { continue }

    newString.append(character)
}

return newString}

}

functions.swift
extension String {

   func transform(_ inputF: (String) -> String) -> String {

                 return inputF(self)  }


 func removeVowels(from string: String) -> String {
    var newString = ""
    for character in string.characters {
        if ["a","e","i","o","u"].contains(character) {
            continue
        }

        newString.append(character)
    }

    return newString}





  }