Swift 5 : Escaping closure captures 'inout' parameter
问题 I already have the response data that I received from the server. This response data have some bakers data. Now I want to calculate the distance of the user and bakery and then store it in the same modal class. I have created a function for it. And as this function need to be used in 4,5 view controllers, my plan is to create as an extension of UIViewController func getDistanceUserBakery(bakeryData : inout [BakeryRecord], completion : @escaping (Int?) -> () ) { for index in 0...(bakeryData