How to use @autoclosure in Swift to improve performance

An autoclosure is a Swift closure that is automatically created to wrap an expression passed as a function argument. In this post, Antoine Van Der Lee demonstrates how we can use autoclosures and provides examples of Swift APIs which use this feature.