Closed holyjak closed 4 days ago
Closing, no idea what that code was supposed to do.
I think @ in WL is some kind of function composition or application operator, but I’m not sure
--------------------- Pawel Ceranka Nette: Research OS for the Web https://www.nette.io/ London, UK
On Sun, Jan 28 2024 at 12:12 am, Jakub Holý @.***> wrote:
Closing, no idea what that code was supposed to do.
— Reply to this email directly, view it on GitHub https://github.com/scicloj/wolframite/issues/21#issuecomment-1913380142, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKYF5TXNLJWWMYXDZP7NHTYQWJYTAVCNFSM6AAAAABAINOLZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGM4DAMJUGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@light-matters do you have some insight into this, pls?
Usually functions are called using "f[x]" notation but it's possible to call them using "f@x". The main use of this is for function composition (https://reference.wolfram.com/language/ref/Composition.html), so I'm guessing that the intention was to replace a@b@c@d .
Crazily, I used to use it simply because mathematica didn't have an easy way of inserting brackets!
Coming from clojure-land, it just seems like unnecessary extra syntax.
Are you saying that Clojure devs can do whatever they need without @
because they can simply do (f (g (h ...)))
? Or could there be a case where they would need the function composition for some reason?
Closing - as discussed, it may not be useful enough to be worth supporting. Will reopen if users actually need this.
See https://github.com/scicloj/wolframite/pull/14#discussion_r1403363309
Note: From the code of the
convert
fn it seems that we are converting such expression "from prefix form" (the opposite ofmeta
🤷 which converts "from postfix form"). So@(a b c)
becomesa[b[c]]
and'(clojure.core/meta (a b c))
becomesc[b[a]]
.As commented below,
so may be not worth fixing.