menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Swift — Fu...
source image

Medium

2d

read

168

img
dot

Image Credit: Medium

Swift — Functions & Closures — Part II

  • A closure is a function combined with any captured variables.
  • Function syntax has a way to specify all constants and variables it wants to capture from the surrounding context.
  • Closure parameters are @nonescaping by default.
  • @autoclosure attribute enables us to define an argument to a function that gets automatically wrapped within a closure.

Read Full Article

like

10 Likes

For uninterrupted reading, download the app