0

I was reading the Apple developer documentation's definition of escaping closures. It says "a closure is said to escape a function when the closure is passed as an argument to the function, but is called after the function returns".

I'm not sure what the last word "return" means in this context. I know a function can return values such as an Int value or a String value. But I'm not sure what it means by "after the function returns".

Please note that I'm not asking what escaping closures are. I just want to know what the word "return" means here. I asked the same question before but everyone was explaining what escaping closures are and none of them explained the word "return" so I just want to make my question clearer this time.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • It sounds like you need a beginner-level programming tutorial. – Jesin Nov 16 '17 at 01:50
  • If this was the question you were asking before, and if it was not answered, why did you accept any answer? If you ask the question in an unclear way or you don't get the kind of answer you want, edit the original question. Do not ask the question _again_. – matt Nov 16 '17 at 01:57

1 Answers1

1

It's like saying "ends". Either the path of execution reaches the keyword return or it reaches the last line of the function body that it's ever going to reach. Either way, it "returns" at that moment. It is the moment when the path of execution resumes at the point where the function was called.

matt
  • 515,959
  • 87
  • 875
  • 1,141