stringToFunction
stringToFunction(t_string[s_langMode] ) =>u_function
Description
Wraps and converts a string of SKILL code into a parameterless SKILL function.
Parses the given string argument and wraps the result with a parameterless lambda, then compiles the entire form into a function object. The returned function can later be applied with better performance than direct evaluation using evalstring.
Arguments
Value Returned
|
Parameterless function equivalent to evaluating the string |
Examples
f = stringToFunction("1+2")
=> funobj:0x220038
apply(f nil)
=> 3
Related Topics
Return to top