Re:Dictionary and Set Improvements in Swift 4.0
by slavapestov on Wednesday October 04, 2017 @06:48PM
(#15405422)
Or just
doSomething
Re:Dictionary and Set Improvements in Swift 4.0
by reednj on Wednesday October 04, 2017 @07:29PM
(#15405678)
I wasn't aware of that syntax? It will just pass the arguments from the parent to the child in order?
Re:Dictionary and Set Improvements in Swift 4.0
by jayrhynas on Wednesday October 04, 2017 @08:21PM
(#15405925)
As long as the signature of the function matches you can pass it in directly
Re:Dictionary and Set Improvements in Swift 4.0
by slavapestov on Wednesday October 04, 2017 @11:13PM
(#15406481)
Functions are values in Swift. Closure literal syntax is just a shorthand where you don’t have to name the function first.
{ doSomething($0) }