iOS Closures in Swift First Class Functions Higher Order Functions

Rea Rahhal
PRO
Rea Rahhal
Pro Student 4,732 Points

make sure you are declaring a function named transform lol

really confused....

functions.swift
// Enter your code below
extension String {
func transform (argument: String -> String) -> String {
    return argument(self)
  }
  }

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,081 Points

Hi there,

If you include the underscore to omit the external label and wrap your first (String) in brackets, your code is fine.

Steve.