-
-
Couldn't load subscription status.
- Fork 81
Open
Description
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 by isdef, while quote x -> x + 2 end is not recognized.
MWE
julia> expr = quote
x -> x + 2
end
julia> MacroTools.isdef(expr)
false
julia> eval(expr)(3)
5julia v1.10
MacroTools v0.5.13
cstjean
Metadata
Metadata
Assignees
Labels
No labels