new jme.funcObj(name, intype, outcons, fn, options)
A JME function. Capable of confirming that it can be evaluated on a given list of arguments, and returning the result of its evaluation on a list of arguments inside a given scope.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | |
intype |
Array.<(function()|string)> | A list of data type constructors for the function's parameters' types. Use the string '?' to match any type. Or, give the type's name with a '*' in front to match any number of that type. If |
outcons |
function | The constructor for the output value of the function. |
fn |
Numbas.jme.evaluate_fn | JavaScript code which evaluates the function. |
options |
Numbas.jme.funcObj_options |