Swift Functions and Closures – Top Blog Posts

When I read about functions and closures in the Swift Programming Language guide, I felt prepared to move on and put it to use. Later when I started reading through Functional Programming in Swift (excellent book!), I came across some code samples that made me realize I needed more of the basics than what I had learned already.

I read a number of blog articles, and as is usually the case, reading through someone else’s experience and method of conveying their understanding with examples was invaluable. In this post, I highlight three excellent posts which really helped make it click for me.

Am I an expert now? Of course not! I’m still learning, but when I went back to Functional Programming in Swift after having digested these blog posts carefully, the areas where I had trouble were clear. The blog posts that helped me were:

AirSpeed Velocity: Basic Tutorial on Functions and Closures in Swift: The section that shows an incremental shortening of a closure expression, along with an explanation of each step … is simply excellent.

Coding Explorer Blog: Closure Expressions in Swift: Another nice walk-through using a different example.

objc.io Blog: The Many Faces of Swift Functions: Swift functions and parameters, with lots of examples that illustrate the syntax. Post written by Natasha Murashev (Natasha The Robot).

If you are stuck on any specifics regarding functions and closures, those posts should definitely help.

Leave a Comment: