{"id":9459,"date":"2014-09-03T09:10:59","date_gmt":"2014-09-03T13:10:59","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=9459"},"modified":"2014-09-03T09:10:59","modified_gmt":"2014-09-03T13:10:59","slug":"the-humble-map","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/09\/03\/the-humble-map\/","title":{"rendered":"The Humble Map"},"content":{"rendered":"<p><a href=\"http:\/\/robnapier.net\/maps\">Rob Napier<\/a>:<\/p>\n<blockquote cite=\"http:\/\/robnapier.net\/maps\"><p>And again we replace our cut-and-paste for-loop with a reusable function that captures the goal. We save some code, but it&rsquo;s more than that. We can compose filters and maps to create more interesting things in highly readable ways.<\/p>\n<p>[&#8230;]<\/p>\n<p>The goal of using <code>map<\/code> and <code>filter<\/code> this way is to make your code easier to\nread, understand, and debug. It gets the boilerplate out of the way and leaves\nyou with the key parts of what you&rsquo;re trying to do.<\/p><\/blockquote>\n<p>This is so much nicer in Swift than Objective-C because of the concise syntax.<\/p>","protected":false},"excerpt":{"rendered":"<p>Rob Napier: And again we replace our cut-and-paste for-loop with a reusable function that captures the goal. We save some code, but it&rsquo;s more than that. We can compose filters and maps to create more interesting things in highly readable ways. [&#8230;] The goal of using map and filter this way is to make your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[71,901],"class_list":["post-9459","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=9459"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9459\/revisions"}],"predecessor-version":[{"id":9461,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9459\/revisions\/9461"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=9459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=9459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=9459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}