iOS Closures in Swift First Class Functions Higher Order Functions

Roop P
PRO
Roop P
Pro Student 6,937 Points

string extensions

Code Looks right but wont pass.

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

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 143,733 Points

Hey there,

You're just missing the closing curly brace for the extension. Other that that... looks good! :thumbsup:

Keep Coding! :) :dizzy: