I was trying to modify a parameter of function from within a escaping closure as below:
var completion = [()->Void]() func addCompletion(closure: @escapin