You should be able to label a 1-tuple return value as a way to document the return value.


(Amir Michail) #1

For example:

func f(n:Int) -> (errorValue:Int) {
    ...
}

print(f(5).errorValue)