{"id":797,"date":"2014-02-27T15:37:43","date_gmt":"2014-02-27T15:37:43","guid":{"rendered":"http:\/\/sdi.thoughtstorms.info\/?p=797"},"modified":"2014-02-27T15:37:43","modified_gmt":"2014-02-27T15:37:43","slug":"learn-you-a-haskell","status":"publish","type":"post","link":"https:\/\/blog.thoughtstorms.info\/?p=797","title":{"rendered":"Learn You a Haskell"},"content":{"rendered":"<p>\nSo I decided to actually sit down and <a href='http:\/\/learnyouahaskell.com\/'>Learn Me a Haskell<\/a>.\n<\/p>\n<p>Worked through the first few sections. Kind of what I knew already except I think I&#8217;m getting a glimmer of why Currying \/ Partial Application is a good idea, at least in that it&#8217;s a very concise way of making higher-order functions on the fly.<\/p>\n<p>Eg. :<br \/>\nHaskell<\/p>\n<pre>\nf x y = x * y\ng = f 5\n<\/pre>\n<p>Python<\/p>\n<pre>\ndef f(y) :\n    return (lambda x : x * y)\ng = f(5)\n<\/pre>\n<p>Haskell is certainly a lot more concise. And in Python you need to explicitly decide you want to make a function which makes multiplying functions. f only has that role. In Haskell f can be both a 2 argument multiply function AND a higher-order function factory.\n<\/p>\n<p>Clever!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I decided to actually sit down and Learn Me a Haskell. Worked through the first few sections. Kind of what I knew already except I think I&#8217;m getting a glimmer of why Currying \/ Partial Application is a good idea, at least in that it&#8217;s a very concise way of making higher-order functions on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[199],"class_list":["post-797","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-haskell"],"_links":{"self":[{"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=797"}],"version-history":[{"count":0,"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/797\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}