ablescript/able-script-test/interlace.able

45 lines
761 B
Plaintext
Raw Normal View History

2021-12-14 15:56:40 -06:00
functio arity_0() {
"this function has arity 0" print;
}
functio arity_1(arg1) {
"this function has arity 1" print;
arg1 print;
}
functio arity_2(arg1, arg2) {
"this function has arity 2" print;
arg1 print;
arg2 print;
}
functio arity_3(arg1, arg2, arg3) {
"this function has arity 3" print;
arg1 print;
arg2 print;
arg3 print;
}
owo arity_0();
owo arity_1("foo");
owo arity_2("foo", "bar");
owo arity_3("foo", "bar", "baz");
var i1 = arity_0 * arity_1;
i1("second");
"----" print;
var i2 = arity_1 * arity_0;
i2("first");
"----" print;
var ifancy = arity_3 * arity_3;
ifancy("left1", "right1", "left2", "right2", "left3", "right3");
"----" print;
var another = arity_0 * arity_3;
another("right1", "right2", "right3");