Closed light-matters closed 1 month ago
They happens is that
(wl/->clj "Subtract[5, 4]") ; => (Subtract 5 4)
(wl/->clj "Minus[5]"). ; => (Minus 5)
while you expected to get '(- 5 4)
and (- 5)
- but we currently do not support reverse alias application and I see no need for it. We could do it (walk the transformed clj data, replace anything that has an alias with the alias)...
I was adding tests to the custom-aliases branch when I noticed:
both fail. They return (Subtract 5 4) and (Minus 5), respectively, instead of (- 5 4) and (- 5). This is something due to the experimental-fn implementation.
Example where this works as expected:
This is, as suggested, most likely due to the fact that
-
has as alias a fn that maps either to Minus or Subtract and the code does not handle the reverse transformation.