Understanding syntax of closure with no return type
|Added at||2016-12-31 23:12|
I am getting into swift for the first time here and I have stumbled across a closure statement that doesn't make a whole lot sense to me based off of my current understanding of how closures are written. This is really a two-part question because I also don't quite grasp the intention/interpretation behind the conditional binding with this closure.
The chunk of code I am thrown by is this:
My understanding is that the closure needs specify a return type based off of the docs definition
My assumption is that the conditional binding statement just says 'if an error arg is passed into this closure, then print the error?
Please use as much detail as possible in your explanation as possible so I can further my understanding. Cheers!