Closures are a special type of function that are created in-line so that you can actually pass them to another function.
I am going to break up a closure statement here so it is a little easier
This is how you declare a closure it is essentially the same as declaring a variable but the type is a functions input types and an optional output. But, this is not a complete closure statement this is the same as
This doesn’t actually define what myName is just declares that it is a variable
Here would be a full closure statement. Which does look very similar to Swift Functions because it is really just a special type of function
What a Closure would most often be used for is passing into another function. This is how a function signature could look when using a Closure
which would then look like this when called