Swift - Functions
Examine this Swift code:
What programming concept is illustrated here and what will be printed?
func createAdder(_ base: Int) -> (Int) -> Int {
return { value in base + value }
}
let addFive = createAdder(5)
print(addFive(10))What programming concept is illustrated here and what will be printed?
