Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Closures in Swift 2 First Class Functions Higher Order Functions

Batuhan Ertas
Batuhan Ertas
1,159 Points

can anyone say what's wrong with that code?

I could not figure out the wrong part of this code.

// Enter your code below

extension String{

  func modify(input: String -> String ) -> String 

      return input(self)


func firstLetter (input:String) -> String
  var arr:[String] = input.characters.map { String($0) }
  return arr[0]


let value:String = String("tugce").modify(firstLetter)