{"id":12850,"date":"2015-11-14T10:59:23","date_gmt":"2015-11-14T15:59:23","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12850"},"modified":"2015-11-14T10:59:23","modified_gmt":"2015-11-14T15:59:23","slug":"where-where-may-be-used-in-swift","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/11\/14\/where-where-may-be-used-in-swift\/","title":{"rendered":"Where &ldquo;where&rdquo; May Be Used in Swift"},"content":{"rendered":"<p><a href=\"http:\/\/blog.krzyzanowskim.com\/2015\/11\/13\/where-where-may-be-used\/\">Marcin Krzy&#380;anowski<\/a>:<\/p>\n<blockquote cite=\"http:\/\/blog.krzyzanowskim.com\/2015\/11\/13\/where-where-may-be-used\/\">\n<p>The fact is you can use <code>where<\/code> keyword in a case label of a <code>switch<\/code> statement, a <code>catch<\/code> clause of a <code>do<\/code> statement, or in the <code>case<\/code> condition of an <code>if<\/code>, <code>while<\/code>, <code>guard<\/code>, <code>for-in<\/code> statement, or to define type constraints.<\/p>\n<\/blockquote>\n<p>There are no <a href=\"http:\/\/www.diveintopython.net\/power_of_introspection\/filtering_lists.html\">Python-style<\/a> list or dictionary comprehensions, though.<\/p>","protected":false},"excerpt":{"rendered":"<p>Marcin Krzy&#380;anowski: The fact is you can use where keyword in a case label of a switch statement, a catch clause of a do statement, or in the case condition of an if, while, guard, for-in statement, or to define type constraints. There are no Python-style list or dictionary comprehensions, though.<\/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":[46,71,901],"class_list":["post-12850","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-languagedesign","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12850","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=12850"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12850\/revisions"}],"predecessor-version":[{"id":12851,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12850\/revisions\/12851"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}