I have this module:
export test_func function test_func() return funk(x) end end
and I have this program
funk(x) = 2 test_func()
which gives the error
UndefVarError: funk not defined. Is there a way to make this work. I want to have a module I can load that might use the function defined in the program to which I have imported the module. Is it doable? I’ve tried setting
global funk(x) = 2 but it seems to have no effect. Similarly it would be useful if the module functions could see constants declared in the main program.
Clarification: test_func is actually a macro so all its input is an expression,