I was going through Apple\'s introduction to Swift and came across such example:
func makeIncrementer() -> ((Int) -> Int) { func addOne(number: In
It indicates that the function returns a function and that returned function takes an Int as an input parameter and returns an Int as well.
Int
Defining functions within functions is perfectly legal in Swift.