Closure in Swift: A reminder on how awesome they are.

I was re-reading Apple’s documentation about closure and I tough it couldn’t hurt anybody to share this little resume about closure syntax.

Here’s a simple closure :

Here’s the same but simpler :

Hmm even simpler :

Huh ?!? Even more :

WTF ?!?! Really ?! (but yeah it works) :

And finally (unreadable but still) :

From The Swift Programming Language (Swift 3.0.1)



Hello World

Hello word !  First blog post ever.  Never heard of me huh ?  No worries, so does 99.99% of the population.  We’ll get to know each other I’m pretty sure of it.  All you need to know for now is that this blog is about my new company “MAB Développement Mobile inc.” but most importantly about iOS and Swift.  I want to use this place as a repository of all those priceless snippets of code and good tricks you get to learn but too often lose and forget.  It’s also a forum so I’m counting on you to put your shoulder to the wheel.  I also want to have fun doing it and reading your comments, because that’s what life is about… fun.