First Class Functions in Swift

Photo by Norman Toth on Unsplash

Swift allows functions to be used like any value when used in the language. This in the vernacular says that functions are “first-class citizens”. If you want a full example of this, scroll down to the bottom of the article and have a look (there is a Gist so you could copy-paste the code right into a…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store