So you can do lots of tricky things with functions in MiniScript, but I haven't seen any way to build a function at runtime.
Is it possible to have a function defined in a string, and then inject it into the code while the code is running, or overwrite an existing function with new code? I can see a way to do sort of do this via import, although it still requires advance knowledge of what you are importing.