Functions
Functions are declared using fn.
Functions can be let or const.
You can use ins to directly insert a function somewhere without having to declare it.
let fn add(a, b)
{
a + b;
}
const fn sub(a, b)
{
// const functions cannot be reassigned / hooked
a - b;
}
fn mult(a, b)
{
a * b;
}
let a: {
do_stuff: ins (a,b,c) { // directly insert a function
print("Doing stuff!");
}
}
a.do_stuff();
If a function declare type(let/const) is not defined, it defaults to let.
NOTE: TuffSeal doesn't have return. The last expression is returned automatically.