{"id":21198,"date":"2018-04-10T14:23:25","date_gmt":"2018-04-10T18:23:25","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=21198"},"modified":"2018-04-10T14:23:25","modified_gmt":"2018-04-10T18:23:25","slug":"overture-a-swift-library-for-function-composition","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/04\/10\/overture-a-swift-library-for-function-composition\/","title":{"rendered":"Overture: a Swift Library for Function Composition"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/pointfreeco\/swift-overture\">Point-Free<\/a> (via <a href=\"https:\/\/twitter.com\/anandabits\/status\/983495683822030848\">Matthew Johnson<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/pointfreeco\/swift-overture\">\n<p>This library was created as an alternative to <a href=\"https:\/\/www.github.com\/pointfreeco\/swift-prelude\">swift-prelude<\/a>, which provides these tools (and more) using infix operators. For example, <code>pipe<\/code> is none other than the arrow composition operator <code>&gt;&gt;&gt;<\/code>, which means the following are equivalent:<\/p>\n<pre>\nxs.map(incr &gt;&gt;&gt; square)\nxs.map(pipe(incr, square))\n<\/pre>\n<p>We know that many code bases are not going to be comfortable introducing operators, so we wanted to reduce the barrier to entry for embracing function composition.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Point-Free (via Matthew Johnson): This library was created as an alternative to swift-prelude, which provides these tools (and more) using infix operators. For example, pipe is none other than the arrow composition operator &gt;&gt;&gt;, which means the following are equivalent: xs.map(incr &gt;&gt;&gt; square) xs.map(pipe(incr, square)) We know that many code bases are not going to [&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":"2018-04-10T18:23:27Z","apple_news_api_id":"17a02de8-0588-48dd-8ffd-ef81249e2507","apple_news_api_modified_at":"2018-04-10T18:23:28Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AF6At6AWISN2P_e-BJJ4lBw","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":[74,71,901],"class_list":["post-21198","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-opensource","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/21198","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=21198"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/21198\/revisions"}],"predecessor-version":[{"id":21199,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/21198\/revisions\/21199"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=21198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=21198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=21198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}