add_predefined_function

Function add_predefined_function 

Source
pub fn add_predefined_function(
    interpreter: &mut Interpreter,
    func_name: impl Into<Box<str>>,
    function: FunctionPointerObjectRef,
)
Expand description

Creates a function which is accessible globally in the Interpreter (= in all scopes)

If function already exists, it will be overridden

Function can be accessed with func.funcName/fn.funcName or with linker.funcName/ln.funcName and can’t be removed nor changed by the Lang file