[swift] Closure with return value for A -> B sequentially
for setup Closure with return value for A -> B sequentially below
func fetchPersonData(completion: (_ str: String) -> Void) { let str = "person" completion(str) //competition notification }
Run code
fetchPersonData(){(str: String) in personLabel.text = str }