Registers a custom function to use with real/complex-valued parsing.
The name of the function to register
The function
// Register factorial functionChalkboard.REGISTER("factorial", (x) => { let n = 1; for (let i = 1; i <= x; i++) n *= i; return n;});// Returns 24const twentyfour = Chalkboard.real.parse("factorial(4)"); Copy
// Register factorial functionChalkboard.REGISTER("factorial", (x) => { let n = 1; for (let i = 1; i <= x; i++) n *= i; return n;});// Returns 24const twentyfour = Chalkboard.real.parse("factorial(4)");
Registers a custom function to use with real/complex-valued parsing.