{"id":1581,"date":"2019-05-19T11:10:46","date_gmt":"2019-05-19T05:40:46","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=1581"},"modified":"2019-05-19T11:10:46","modified_gmt":"2019-05-19T05:40:46","slug":"currying-in-mathematica","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/","title":{"rendered":"Currying in Mathematica"},"content":{"rendered":"<p>One of the more recent additions to the core <em><strong>Wolfram<\/strong><\/em> Language is the <em><strong>\u201cCurry\u201d<\/strong><\/em> function. It was introduced in <em><strong>Mathematica<\/strong><\/em> ver <em><strong>11.3<\/strong><\/em> and is still (as of ver <em><strong>12.0<\/strong><\/em>) considered <em>Experimental<\/em>. In this post, I would like to go over this function briefly.<\/p>\n<p>Non-curried functions in <em><strong>Mathematica<\/strong><\/em> have to be invoked with the arguments (both number and types) correctly matched. See the following example.<\/p>\n<figure id=\"attachment_1582\" aria-describedby=\"caption-attachment-1582\" style=\"width: 654px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Function-Call.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"1582\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/function-call\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Function-Call.png\" data-orig-size=\"654,101\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Function Call\" data-image-description=\"&lt;p&gt;Function Call&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Function Call&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Function-Call.png\" class=\"size-full wp-image-1582\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Function-Call.png?resize=654%2C101&#038;ssl=1\" alt=\"Function Call\" width=\"654\" height=\"101\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Function-Call.png?w=654&amp;ssl=1 654w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Function-Call.png?resize=300%2C46&amp;ssl=1 300w\" sizes=\"(max-width: 654px) 100vw, 654px\" \/><\/a><figcaption id=\"caption-attachment-1582\" class=\"wp-caption-text\"><strong>Function Call<\/strong><\/figcaption><\/figure>\n<p>Mismatched arguments will not match the function definition and hence it will not be called. Obviously, this is the expected and correct behaviour.<\/p>\n<figure id=\"attachment_1584\" aria-describedby=\"caption-attachment-1584\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Argument-Mismatch.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1584\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/argument-mismatch\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Argument-Mismatch.png\" data-orig-size=\"659,150\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Argument Mismatch\" data-image-description=\"&lt;p&gt;Argument Mismatch&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Argument Mismatch&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Argument-Mismatch.png\" class=\"wp-image-1584\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Argument-Mismatch.png?resize=650%2C148&#038;ssl=1\" alt=\"Argument Mismatch\" width=\"650\" height=\"148\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Argument-Mismatch.png?w=659&amp;ssl=1 659w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Argument-Mismatch.png?resize=300%2C68&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-1584\" class=\"wp-caption-text\"><strong>Argument Mismatch<\/strong><\/figcaption><\/figure>\n<p>The <a href=\"https:\/\/reference.wolfram.com\/language\/ref\/Curry.html\" target=\"_blank\" rel=\"noopener\"><em><strong>\u201cCurry\u201d<\/strong><\/em><\/a>\u00a0function allows us to explicitly define <em><strong>curried<\/strong><\/em> functions. The commonly used form of this function takes as arguments, a function and its arity, and returns its curried variant. The following examples illustrate this idea.<\/p>\n<figure id=\"attachment_1586\" aria-describedby=\"caption-attachment-1586\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Currying.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1586\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/currying\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Currying.png\" data-orig-size=\"660,382\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Currying\" data-image-description=\"&lt;p&gt;Currying&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Currying&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Currying.png\" class=\"wp-image-1586\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Currying.png?resize=650%2C376&#038;ssl=1\" alt=\"Currying\" width=\"650\" height=\"376\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Currying.png?w=660&amp;ssl=1 660w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Currying.png?resize=300%2C174&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-1586\" class=\"wp-caption-text\"><strong>Currying<\/strong><\/figcaption><\/figure>\n<p>Notice the following:<\/p>\n<p style=\"padding-left: 30px;\">1) A curried function can be invoked by passing all arguments, as in a normal function call<\/p>\n<p style=\"padding-left: 30px;\">2) When it is invoked using partial arguments, it returns another function that remembers the passed arguments and uses them when invoked with further arguments<\/p>\n<p style=\"padding-left: 30px;\">3) The order of arguments is the same as in the original (un-curried) function<\/p>\n<p>If a function takes just two arguments and we want the second argument to be curried, then we can use a simpler variant of the <em><strong>\u201cCurry\u201d<\/strong><\/em> function.<\/p>\n<figure id=\"attachment_1587\" aria-describedby=\"caption-attachment-1587\" style=\"width: 651px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Curry-Variant.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1587\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/curry-variant\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Curry-Variant.png\" data-orig-size=\"662,178\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Curry Variant\" data-image-description=\"&lt;p&gt;Curry Variant&lt;\/p&gt;\n\" data-image-caption=\"\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Curry-Variant.png\" class=\"wp-image-1587\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Curry-Variant.png?resize=651%2C175&#038;ssl=1\" alt=\"Curry Variant\" width=\"651\" height=\"175\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Curry-Variant.png?w=662&amp;ssl=1 662w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Curry-Variant.png?resize=300%2C81&amp;ssl=1 300w\" sizes=\"(max-width: 651px) 100vw, 651px\" \/><\/a><figcaption id=\"caption-attachment-1587\" class=\"wp-caption-text\"><strong>Curry Variant<\/strong><\/figcaption><\/figure>\n<p>Now that you understand how the <em><strong>\u201cCurry\u201d<\/strong><\/em> function works, let us see how we can implement it in a language that does not have this feature. For example, even though it has so many great features, <em><strong>Lisp<\/strong><\/em> (more precisely, <em><strong>Common Lisp<\/strong><\/em>), does not support currying by default. How can we implement <em><strong>Mathematica\u2019s<\/strong> <strong>\u201cCurry\u201d<\/strong><\/em> function in <em><strong>Lisp<\/strong><\/em>? Quite simple, actually. See the following implementation and how it is used.<\/p>\n<figure id=\"attachment_1588\" aria-describedby=\"caption-attachment-1588\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-currying.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1588\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/lisp-currying\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-currying.jpg\" data-orig-size=\"515,263\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1558257955&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Currying in Lisp\" data-image-description=\"&lt;p&gt;Currying in Lisp&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Currying in Lisp&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-currying.jpg\" class=\"wp-image-1588\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-currying.jpg?resize=650%2C332&#038;ssl=1\" alt=\"Currying in Lisp\" width=\"650\" height=\"332\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-currying.jpg?w=515&amp;ssl=1 515w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-currying.jpg?resize=300%2C153&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-1588\" class=\"wp-caption-text\"><strong>Currying in Lisp<\/strong><\/figcaption><\/figure>\n<p>Here is how it can be used:<\/p>\n<figure id=\"attachment_1589\" aria-describedby=\"caption-attachment-1589\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-Usage.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1589\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/19\/currying-in-mathematica\/lisp-usage\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-Usage.jpg\" data-orig-size=\"471,319\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1558258271&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Lisp Currying Examples\" data-image-description=\"&lt;p&gt;Lisp Currying Examples&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Lisp Currying Examples&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-Usage.jpg\" class=\"wp-image-1589\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-Usage.jpg?resize=650%2C440&#038;ssl=1\" alt=\"Lisp Currying Examples\" width=\"650\" height=\"440\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-Usage.jpg?w=471&amp;ssl=1 471w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/Lisp-Usage.jpg?resize=300%2C203&amp;ssl=1 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><figcaption id=\"caption-attachment-1589\" class=\"wp-caption-text\"><strong>Lisp Currying Examples<\/strong><\/figcaption><\/figure>\n<p>Hope I was able to shed some light on <em><strong>Mathematica\u2019s &#8220;Curry&#8221;<\/strong><\/em> function. Have a nice weekend!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the more recent additions to the core Wolfram Language is the \u201cCurry\u201d function. It was introduced in Mathematica ver 11.3 and is still (as of ver 12.0) considered Experimental. In this post, I would like to go over this function briefly. Non-curried functions in Mathematica have to be invoked with the arguments (both [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[18,72,17],"tags":[110,209,43],"class_list":["post-1581","post","type-post","status-publish","format-standard","hentry","category-lisp","category-mathematica","category-programming","tag-common-lisp","tag-currying","tag-mathematica"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-pv","jetpack-related-posts":[{"id":1091,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/10\/14\/c17-stdapply-and-stdinvoke\/","url_meta":{"origin":1581,"position":0},"title":"C++17 &#8211; std::apply() and std::invoke()","author":"admin","date":"October 14, 2018","format":false,"excerpt":"Calling a function (or function object) dynamically, through a pointer known at runtime, is a common programming scenario. Almost all languages support this use case. Lisp, for example, has apply and funcall. When using apply, you can see that the arguments are passed via a separate list object. With funcall,\u2026","rel":"","context":"In &quot;C++&quot;","block_context":{"text":"C++","link":"https:\/\/www.rangakrish.com\/index.php\/category\/c\/"},"img":{"alt_text":"Calling Member Functions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/Code5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/Code5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/Code5.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/Code5.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2610,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/11\/14\/currying-in-newlisp\/","url_meta":{"origin":1581,"position":1},"title":"Currying in &#8220;newLisp&#8221;","author":"admin","date":"November 14, 2021","format":false,"excerpt":"In the last two articles, I discussed what I believe are some interesting features of \"newLisp\". Today's topic is \"currying\", another useful feature. For those of you who are new to this topic, I had earlier written about \"currying\" in Mathematica here. You may want to take a look at\u2026","rel":"","context":"In &quot;newLisp&quot;","block_context":{"text":"newLisp","link":"https:\/\/www.rangakrish.com\/index.php\/category\/newlisp\/"},"img":{"alt_text":"Example of Currying","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/11\/Example1-300x141.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1560,"url":"https:\/\/www.rangakrish.com\/index.php\/2019\/05\/05\/python-integration-in-mathematica-12\/","url_meta":{"origin":1581,"position":2},"title":"Python Integration in Mathematica 12","author":"admin","date":"May 5, 2019","format":false,"excerpt":"Mathematica has had Python support since ver 11.2 through ExternalEvaluate[]. In ver 11.3 it was possible to input Python expression in a cell by beginning with \u201c>\u201d character. The good news is that Mathematica 12 has significantly enhanced this integration. Python Cells Let us start with the simplest way to\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Function References","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/External-Evaluate-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/External-Evaluate-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/05\/External-Evaluate-4.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3514,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/10\/02\/using-openai-from-mathematica-part-2\/","url_meta":{"origin":1581,"position":3},"title":"Using OpenAI from Mathematica: Part-2","author":"admin","date":"October 2, 2024","format":false,"excerpt":"I had written an earlier article\u00a0showing how to use OpenAI models from Mathematica ver 14.0.\u00a0 Wolfram Mathematica ver 14.1 was released recently, with several improvements in the area of LLMs. Of course, there are many other core additions as well, but our focus is on LLMs in this article. This\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"LLMSynthesize Function","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/10\/image1-300x71.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/10\/image1-300x71.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/10\/image1-300x71.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":2084,"url":"https:\/\/www.rangakrish.com\/index.php\/2020\/08\/16\/pattern-matching-comparing-elixir-and-mathematica\/","url_meta":{"origin":1581,"position":4},"title":"Pattern Matching: Comparing Elixir and Mathematica","author":"admin","date":"August 16, 2020","format":false,"excerpt":"One of the things I like about Elixir\u00a0is its support for patterns at the core language level, not through library functions as in most other languages. This contributes to writing cleaner code, in my opinion. \u00a0 Another environment that I am familiar with, namely Mathematica, boasts of (arguably) the most\u2026","rel":"","context":"In &quot;Elixir&quot;","block_context":{"text":"Elixir","link":"https:\/\/www.rangakrish.com\/index.php\/category\/elixir\/"},"img":{"alt_text":"Symbolic Expressions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/08\/pattern-mm.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/08\/pattern-mm.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/08\/pattern-mm.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":870,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/03\/25\/question-answering-in-mathematica\/","url_meta":{"origin":1581,"position":5},"title":"Question Answering in Mathematica","author":"admin","date":"March 25, 2018","format":false,"excerpt":"About 10 days ago, I received an update for Mathematica. The latest version is 11.3.0. As usual, I looked through the list of new features\u00a0in this release. There are several new features, but one of them attracted my attention immediately: There is a new function FindTextualAnswer\u00a0that, given a piece of\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Example 1","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/03\/Example1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/03\/Example1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/03\/Example1.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/1581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=1581"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/1581\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=1581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=1581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=1581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}