Swift-memo defer

code

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

run()()

prints

run defer
run body