tag:blogger.com,1999:blog-5743983044224833668.post3811441308611588305..comments2023-03-30T02:13:37.406-07:00Comments on Fatvat: The Shunting Yard AlgorithmJeffhttp://www.blogger.com/profile/08195722595923882332noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5743983044224833668.post-82965463676161586142009-06-14T13:55:13.774-07:002009-06-14T13:55:13.774-07:00Thanks for the comments.
That's exactly why I...Thanks for the comments.<br /><br />That's exactly why I was looking at it! I tried to jump immediately to writing the macro, but quickly got myself tied up in knot.<br /><br />Now I've got something simple in place (with tests) hopefully I can refactor it into a function working with nested lists, and then into a macro.<br /><br />I'll have a go at doing it tomorrow and post the results here!Jeffhttps://www.blogger.com/profile/08195722595923882332noreply@blogger.comtag:blogger.com,1999:blog-5743983044224833668.post-56774816200949380432009-06-14T12:44:03.889-07:002009-06-14T12:44:03.889-07:00Neat!
I was recently wondering how straight-forw...Neat! <br /><br />I was recently wondering how straight-forward this type of conversion would be and, in particular, whether it would be possible to create some kind of macro to convert infix to prefix.<br /><br />It would be great to have a macro that allows more maths-intensive algorithms in Clojure to be expressed in an infix style. For example, one could write (i2p [4/3 * Math.PI * r^3]) and have it expanded to the equivalent prefix Clojure code before it is executed.<br /><br />How difficult do you think something like this would be?Anonymousnoreply@blogger.com