Answers for "swift pass any closer to the function"

0

swift pass any closer to the function

func anyFunc<T>(_ closure: @autoclosure () -> T) {
  let result: T = closure()
  // TODO: Do something with result?
}

anyFunc(print("hello"))
Posted by: Guest on September-28-2021

Code answers related to "swift pass any closer to the function"

Code answers related to "Swift"

Browse Popular Code Answers by Language