Closed eivindw closed 8 years ago
Alternatively; is there a way to only use the "Basic ops"? Maybe a separate macro only using basic ops or something could be made? The expressions I need to solve typically look like this:
(infix a - b + 2 * e - f - 114)
So I don't really need the aliases at all..
You could try:
(with-redefs [infix.macros/operator-aliases nil]
(infix e * 2))
I'll have a think about a more satisfactory longer term solution
If you add a call to (infix.core/suppress! 'e)
somewhere before the macro call, then e
won't be aliased to Math/E
anymore:
user=> (macroexpand-1 '(infix e * 2))
(* e 2)
In my code I had a value named e. In the expression this was translated to Math/E:
Is there any way I could exclude e from being aliased? I could of course change my code, but the original expression description uses the name e so I would rather keep it if I can..
What I wish for is a way I could make it keep e as the value: