You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah, that's slightly awkward. On one hand, we could do striplines here (and/or remove the begin block) and it would work fine. On the other hand, expr is technically a block that contains a function definition; not a function definition.
I would lean towards lining up the behaviour with splitdef. Does splitdef(expr) work?
Then let's fix isdef! Thank you for the bug report. I think it's basically just to remove the block. There's already a function for it in utils.jl IIRC
I need to convert a mathematical function in a string into Julia lambda function.
Just found the package, it seems very useful.
Just stumbled by a very basic example:
expr = :(x -> x + 2)
is recognized as a function byisdef
, whilequote x -> x + 2 end
is not recognized.MWE
julia v1.10
MacroTools v0.5.13
The text was updated successfully, but these errors were encountered: