Swift-memo defer

Updated
Mar 22, 2020 5:14 PM
Created
Mar 22, 2020 5:14 PM
Tags
SwiftMemo
Keywords
Date

code

func run() -> () -> Void {
  defer {
    print("run defer")
  }
  return {
    print("run body")
  }
}

run()()

prints

run defer
run body