ablescript/able-script-test/by-arity-chain.able

45 lines
809 B
Plaintext
Raw Normal View History

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