-
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
Hi there,
I have users defining (simple) functions as strings in a config file, which ultimately get made into functions.
Often a user has a function return a constant.
My code fails in this case, MWE below.
Any ideas where I'm going wrong?
using RuntimeGeneratedFunctions
RuntimeGeneratedFunctions.init(@__MODULE__)
s = "() -> 1"
ex = Meta.parse(s)
f = @RuntimeGeneratedFunction(ex)If I set s = (x) -> 1 it works, but then I don't have a function of 0 arguments, which is required by downstream code.
Metadata
Metadata
Assignees
Labels
No labels