{"id":1178,"date":"2017-10-10T10:49:22","date_gmt":"2017-10-10T01:49:22","guid":{"rendered":"http:\/\/blue-bear.jp\/kb\/?p=1178"},"modified":"2017-10-10T10:49:22","modified_gmt":"2017-10-10T01:49:22","slug":"swift-closure-with-return-value-for-a-b-sequentially","status":"publish","type":"post","link":"https:\/\/blue-bear.jp\/kb\/swift-closure-with-return-value-for-a-b-sequentially\/","title":{"rendered":"[swift] Closure with return value for A -> B sequentially"},"content":{"rendered":"<p>for setup Closure with return value for A -> B sequentially below<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"\">\r\n  func fetchPersonData(completion: (_ str: String) -> Void) {\r\n\r\n    let str = \"person\"\r\n    completion(str) \/\/competition notification\r\n\r\n  }\r\n<\/pre>\n<p>Run code<\/p>\n<pre>\r\n    fetchPersonData(){(str: String) in\r\n      personLabel.text = str\r\n    }\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>for setup Closure wi<\/p>\n","protected":false},"author":1,"featured_media":88,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/1178"}],"collection":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/comments?post=1178"}],"version-history":[{"count":1,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/1178\/revisions"}],"predecessor-version":[{"id":1179,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/posts\/1178\/revisions\/1179"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media\/88"}],"wp:attachment":[{"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/media?parent=1178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/categories?post=1178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blue-bear.jp\/kb\/wp-json\/wp\/v2\/tags?post=1178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}