Depends on your needs there is an addition to accepted answer. You may also implement it like this:
var parseCompletion: (() ->Void)!
and later in some func assign to it
func someHavyFunc(completion: @escaping () -> Void){
self.parseCompletion = completion
}
and in some second function use it
func someSecondFunc(){
if let completion = self.parseCompletion {
completion()
}
}
note that @escaping
parameter is a mandatory here