japl/tests/japl/callchain.jpl

26 lines
216 B
Plaintext

/*
[Test: callchain]
*/
//[source: mixed]
fun add2(x)
{
return x + 2;
}
fun sub2(x)
{
return x - 2;
}
fun mul2(x)
{
return x * 2;
}
print(add2(sub2(mul2(sub2(5)))));
//[end]
/*
[stdout]
6
[end]
[end]
*/